diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-04-15 00:26:35 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-04-15 00:26:35 +0000 |
commit | dbecc1f5494620dfedf2d8794b243156d26c2391 (patch) | |
tree | 2b88aa9e01bcca308ab0396ac268e41e123503a6 /gcc/emit-rtl.c | |
parent | 94b1b2e8fb283e55593a46dd073aa4f8bf1d8fc6 (diff) | |
download | gcc-dbecc1f5494620dfedf2d8794b243156d26c2391.tar.gz |
8
* emit-rtl.c (operand_subword): Rework slightly to avoid
bogus warning from previous change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19219 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index ef795235c77..4d9361ce9bc 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1091,6 +1091,7 @@ operand_subword (op, i, validate_address, mode) { HOST_WIDE_INT val; int size_ratio = HOST_BITS_PER_WIDE_INT / BITS_PER_WORD; + int bits_per_word = BITS_PER_WORD; if (mode == VOIDmode) mode = GET_MODE (op); @@ -1339,9 +1340,9 @@ operand_subword (op, i, validate_address, mode) bit are all one. So we get either a reasonable negative value or a reasonable unsigned value for this mode. */ if (BITS_PER_WORD < HOST_BITS_PER_WIDE_INT - && ((val & ((HOST_WIDE_INT) (-1) << (BITS_PER_WORD - 1))) - != ((HOST_WIDE_INT) (-1) << (BITS_PER_WORD - 1)))) - val &= ((HOST_WIDE_INT) 1 << BITS_PER_WORD) - 1; + && ((val & ((HOST_WIDE_INT) (-1) << (bits_per_word - 1))) + != ((HOST_WIDE_INT) (-1) << (bits_per_word - 1)))) + val &= ((HOST_WIDE_INT) 1 << bits_per_word) - 1; /* If this would be an entire word for the target, but is not for the host, then sign-extend on the host so that the number will look @@ -1353,8 +1354,8 @@ operand_subword (op, i, validate_address, mode) The later confuses the sparc backend. */ if (BITS_PER_WORD < HOST_BITS_PER_WIDE_INT - && (val & ((HOST_WIDE_INT) 1 << (BITS_PER_WORD - 1)))) - val |= ((HOST_WIDE_INT) (-1) << BITS_PER_WORD); + && (val & ((HOST_WIDE_INT) 1 << (bits_per_word - 1)))) + val |= ((HOST_WIDE_INT) (-1) << bits_per_word); return GEN_INT (val); } |