From dbecc1f5494620dfedf2d8794b243156d26c2391 Mon Sep 17 00:00:00 2001 From: law Date: Wed, 15 Apr 1998 00:26:35 +0000 Subject: 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 --- gcc/emit-rtl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gcc/emit-rtl.c') 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); } -- cgit v1.2.1