This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH:[darwin] fix load of a misaligned double word


The offset (the 3 part) has to be 4 byte aligned, not the whole address.
Another way to put it: the offset has to be a multiple of 4.

Correct. This is an architectural limitation; the instruction adds two implicit 0 bits at the
low end of the displacement. This occurs only for ld/std, not lfd/stfd (go figure).

It is also the case for lwa (everything in primary opcodes 58 and 62, really).


I think it's meant to save some opcode space ;-)


Segher



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]