summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-24 16:12:44 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-24 16:12:44 +0000
commitb911bf3d59e7d01ad67976f2c0b19ad0a85f6cd4 (patch)
tree0217b67b781fe5d7bd997af8a7c040a4b1db73ae
parent2b9f627de468b9b7e69cc15551ea39be73eb871f (diff)
downloadppe42-gcc-b911bf3d59e7d01ad67976f2c0b19ad0a85f6cd4.tar.gz
ppe42-gcc-b911bf3d59e7d01ad67976f2c0b19ad0a85f6cd4.zip
Cope with down shifting a 32 bit constant on a 64 bit host.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29655 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/combine.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 587c9505339..b6723ea9039 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Fri Sep 24 17:10:56 1999 Nick Clifton <nickc@cygnus.com>
+
+ * combine.c (simplify_comparison): Cope with downshifting a 32 bit
+ constant on a 64 bit host. Patch supplied by Geoffrey Keating
+ <geoffk@cygnus.com>.
+
Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
* builtins.c (expand_builtin): Use MD_EXPAND_BUILTIN if defined.
diff --git a/gcc/combine.c b/gcc/combine.c
index 0e556db4ab9..61d55d0c893 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10364,10 +10364,10 @@ simplify_comparison (code, pop0, pop1)
{
/* We must perform a logical shift, not an arithmetic one,
as we want the top N bits of C to be zero. */
- unsigned HOST_WIDE_INT temp = const_op;
+ unsigned HOST_WIDE_INT temp = const_op & GET_MODE_MASK (mode);
temp >>= INTVAL (XEXP (op0, 1));
- op1 = GEN_INT (temp);
+ op1 = GEN_INT (trunc_int_for_mode (temp, mode));
op0 = XEXP (op0, 0);
continue;
}
OpenPOWER on IntegriCloud