This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH:[darwin] fix load of a misaligned double word
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: Bradley Lucier <lucier at math dot purdue dot edu>, gcc-patches at gcc dot gnu dot org, dje at watson dot ibm dot com, fjahanian at apple dot com, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Sat, 10 Jan 2004 11:36:57 +0100
- Subject: Re: PATCH:[darwin] fix load of a misaligned double word
- References: <2CCD8331-34DE-11D8-B318-000A958F150A@math.purdue.edu> <C3C1F18B-34DF-11D8-BB55-000393A6D2F2@physics.uc.edu> <66CB8AD3-34E0-11D8-8BC3-000A958F150A@math.purdue.edu> <EEAC42D8-34E0-11D8-BB55-000393A6D2F2@physics.uc.edu> <22D04B31-34E2-11D8-BBD2-000A95D7CD40@apple.com>
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