diff options
author | Richard Sandiford <richard@codesourcery.com> | 2007-05-19 07:21:41 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-05-19 07:21:41 +0000 |
commit | 6de3644168854618eafd229d72356ead4f92a0cf (patch) | |
tree | 7eea9e9f4f1656ac84d97d18d37cdf1d04f26dd6 /gcc | |
parent | 752b7d38db4314d146297c6736ec9ab65068ffa8 (diff) | |
download | gcc-6de3644168854618eafd229d72356ead4f92a0cf.zip gcc-6de3644168854618eafd229d72356ead4f92a0cf.tar.gz gcc-6de3644168854618eafd229d72356ead4f92a0cf.tar.bz2 |
mips.c (mips_offset_within_alignment_p): Tweak comment.
gcc/
* config/mips/mips.c (mips_offset_within_alignment_p): Tweak comment.
Use a single return statement.
From-SVN: r124853
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 78ea258..4d75f78 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-05-19 Richard Sandiford <richard@codesourcery.com> + + * config/mips/mips.c (mips_offset_within_alignment_p): Tweak comment. + Use a single return statement. + 2007-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> PR middle-end/30250 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index ff83eb7..f3f5d2b 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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, HOST_WIDE_INT offset) 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 |