angr_platforms/msp430/instrs_msp430.py
def parse(self, bitstrm):
        """
        MSP430 instructions can have one or two extension words for 16 bit immediates
        We therefore extend the normal parsing so that we make sure we can
        get another word if we have to.
        """
        data = Instruction.parse(self, bitstrm)
        data['S'] = None
        data['D'] = None
        # We don't always have a source or destination.
        # Theoretically I could put these in the TypeXInstruction classes, but
        # I'm lazy. Note that we resolve these here, as opposed to later, due to
        # needing to fiddle with the bitstream.
        l.debug(data)
        if 's' in data:
            src_mode = int(data['A'], 2)
            if (src_mode == ArchMSP430.Mode.INDEXED_MODE and data['s'] != '0011') \
                    or (data['s'] == '0000' and src_mode == ArchMSP430.Mode.INDIRECT_AUTOINCREMENT_MODE):
                data['S'] = bitstring.Bits(uint=bitstrm.read('uintle:16'), length=16).bin
                self.bitwidth += 16 # pylint: disable=no-member
        if 'd' in data:
            dst_mode = int(data['a'], 2)
            if dst_mode == ArchMSP430.Mode.INDEXED_MODE:
                data['D'] = bitstring.Bits(uint=bitstrm.read('uintle:16'), length=16).bin
                self.bitwidth += 16 # pylint: disable=no-member
        return data

        MSP430 instructions can have one or two extension words for 16 bit immediates
        We therefore extend the normal parsing so that we make sure we can
        get another word if we have to.
        
MSP430 instructions can have one or two extension words for 16 bit immediates
We therefore extend the normal parsing so that we make sure we can
get another word if we have to.
MSP430 instructions can have one or two extension words for 16 bit immediates We therefore extend the normal parsing so that we make sure we can get another word if we have to .
def parse(self, bitstrm):
        data = Instruction.parse(self, bitstrm)
        data['S'] = None
        data['D'] = None
        l.debug(data)
        if 's' in data:
            src_mode = int(data['A'], 2)
            if (src_mode == ArchMSP430.Mode.INDEXED_MODE and data['s'] != '0011') \
                    or (data['s'] == '0000' and src_mode == ArchMSP430.Mode.INDIRECT_AUTOINCREMENT_MODE):
                data['S'] = bitstring.Bits(uint=bitstrm.read('uintle:16'), length=16).bin
                self.bitwidth += 16 
        if 'd' in data:
            dst_mode = int(data['a'], 2)
            if dst_mode == ArchMSP430.Mode.INDEXED_MODE:
                data['D'] = bitstring.Bits(uint=bitstrm.read('uintle:16'), length=16).bin
                self.bitwidth += 16 
        return data
def parse ( self , bitstrm ) : data = Instruction . parse ( self , bitstrm ) data [ 'S' ] = None data [ 'D' ] = None l . debug ( data ) if 's' in data : src_mode = int ( data [ 'A' ] , 2 ) if ( src_mode == ArchMSP430 . Mode . INDEXED_MODE and data [ 's' ] != '0011' ) or ( data [ 's' ] == '0000' and src_mode == ArchMSP430 . Mode . INDIRECT_AUTOINCREMENT_MODE ) : data [ 'S' ] = bitstring . Bits ( uint = bitstrm . read ( 'uintle:16' ) , length = 16 ) . bin self . bitwidth += 16 if 'd' in data : dst_mode = int ( data [ 'a' ] , 2 ) if dst_mode == ArchMSP430 . Mode . INDEXED_MODE : data [ 'D' ] = bitstring . Bits ( uint = bitstrm . read ( 'uintle:16' ) , length = 16 ) . bin self . bitwidth += 16 return data
MSP430 instructions can have one or two extension words for 16 bit immediates
We therefore extend the normal parsing so that we make sure we can
get another word if we have to.
MSP430 instructions can have one or two extension words for 16 bit immediates We therefore extend the normal parsing so that we make sure we can get another word if we have to .
"""
        MSP430 instructions can have one or two extension words for 16 bit immediates
        We therefore extend the normal parsing so that we make sure we can
        get another word if we have to.
        """ # We don't always have a source or destination. # Theoretically I could put these in the TypeXInstruction classes, but # I'm lazy. Note that we resolve these here, as opposed to later, due to # needing to fiddle with the bitstream. # pylint: disable=no-member # pylint: disable=no-member
self
bitstrm