(self, addr, size)
return result
Resolves a memory access of a certain size. Returns a sequence of the bases, offsets, and sizes of the accesses required
        to fulfil this.
Resolves a memory access of a certain size. Returns a sequence of the bases, offsets, and sizes of the accesses required
        to fulfil this.
Resolves a memory access of a certain size . Returns a sequence of the bases offsets and sizes of the accesses required to fulfil this .
def _resolve_access(self, addr, size):
        """
        Resolves a memory access of a certain size. Returns a sequence of the bases, offsets, and sizes of the accesses required
        to fulfil this.
        """

        # if we fit in one word
        first_offset = addr % self.width
        first_base = addr - first_offset
        if first_offset + size <= self.width:
            result = [(first_base, first_offset, size)]
        else:
            last_size = (addr + size) % self.width
            last_base = addr + size - last_size

            result = [(first_base, first_offset, self.width - first_offset)]
            result.extend((a, 0, self.width) for a in range(first_base+self.width, last_base, self.width))
            if last_size != 0:
                result.append((last_base, 0, last_size))

        # little endian: need to slice in reverse and also concatenate in reverse
        # if load endness and storage endness don't match, reverse whole data value before store/after load
        if self.endness == 'Iend_LE':
            result = [(addr, self.width - offset - size, size) for addr, offset, size in reversed(result)]

        return result
def _resolve_access ( self , addr , size ) : # if we fit in one word first_offset = addr % self . width first_base = addr - first_offset if first_offset + size <= self . width : result = [ ( first_base , first_offset , size ) ] else : last_size = ( addr + size ) % self . width last_base = addr + size - last_size result = [ ( first_base , first_offset , self . width - first_offset ) ] result . extend ( ( a , 0 , self . width ) for a in range ( first_base + self . width , last_base , self . width ) ) if last_size != 0 : result . append ( ( last_base , 0 , last_size ) ) # little endian: need to slice in reverse and also concatenate in reverse # if load endness and storage endness don't match, reverse whole data value before store/after load if self . endness == 'Iend_LE' : result = [ ( addr , self . width - offset - size , size ) for addr , offset , size in reversed ( result ) ] return result