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: mips tls with -mlong64/-mgp32


DJ Delorie <dj@redhat.com> writes:
> Patch checked in.  Thanks!

Looking at the commit, I noticed that you didn't make one of the other
nitpicky changes I asked for and that you didn't fully update one of the
comments.  (Perhaps you thought "zero offset" wasn't needed because you
thought zero didn't count as an offset, and that "any offset" was therefore
still right.  But I think it's confusing to say that we don't "accept
any offset" while still returning true for one value of "offset".)

I also noticed you'd changed my "Return" to "Returns".  (It was in
the patch, but I missed it.)  I think the former is more common in gcc,
and certainly the style used in the mips.c, so I changed it back while
I was there.

No big deal of course.  I feel bad writing this at all, but since we're
supposed to send each change we make to gcc-patches...  (And it took
longer to write this message than to make the change.)

Richard


gcc/
	* config/mips/mips.c (mips_offset_within_alignment_p): Tweak comment.
	Use a single return statement.

Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	(revision 124852)
+++ gcc/config/mips/mips.c	(working copy)
@@ -1351,15 +1351,15 @@ mips_classify_symbol (rtx x)
   return SYMBOL_GENERAL;
 }
 
-/* Returns true if OFFSET is within the range [0, ALIGN), where ALIGN
+/* Return true if OFFSET is within the range [0, ALIGN), where ALIGN
    is the alignment (in bytes) of SYMBOL_REF X.  */
 
 static bool
 mips_offset_within_alignment_p (rtx x, HOST_WIDE_INT offset)
 {
   /* If for some reason we can't get the alignment for the
-     symbol, initializing this to one means we won't accept any
-     offset.  */
+     symbol, initializing this to one means we will only accept
+     a zero offset.  */
   HOST_WIDE_INT align = 1;
   tree t;
 
@@ -1368,9 +1368,7 @@ mips_offset_within_alignment_p (rtx x, H
   if (t)
     align = DECL_ALIGN_UNIT (t);
 
-  if (offset >= 0 && offset < align)
-    return true;
-  return false;
+  return offset >= 0 && offset < align;
 }
 
 /* Return true if X is a symbolic constant that can be calculated in


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