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: David Edelsohn <dje at watson dot ibm dot com>
- To: Hartmut Penner <hpenner at de dot ibm dot com>
- Cc: Geoff Keating <geoffk at geoffk dot org>, Andrew Pinski <pinskia at physics dot uc dot edu>, Fariborz Jahanian <fjahanian at apple dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 08 Jan 2004 11:25:16 -0500
- Subject: Re: PATCH:[darwin] fix load of a misaligned double word
>>>>> Hartmut Penner writes:
+/* Return true, if operand is a word-aligned memory operand. */
+
+ int
+ aligned_memory_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
The problem is not the alignment of the memory, so this function name is
inaccurate. The issue is that displacements need to be in word chunks.
word_offset_memref_operand() would be a better term, with an appropriate
change to the comment.
+ return !(off & 3);
The function is not returning a bool, so please do not compute a logical
value. Either use (off & 3) == 0 or (off % 4) == 0.
Thanks, David