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


>>>>> 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


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