diff options
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/loop.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 446844c..890853e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Mon Feb 2 01:38:39 1998 J"orn Rennecke <amylaar@cygnus.co.uk> + + * loop.c (get_condition): Handle sign-extended constants. + Mon Feb 2 01:22:46 1998 Hans-Peter Nilsson <hp@axis.se> * expr.c (emit_push_insn): Add code to use movstrti if present. @@ -7075,15 +7075,17 @@ get_condition (jump, earliest) code = LT, op1 = GEN_INT (const_val + 1); break; + /* When cross-compiling, const_val might be sign-extended from + BITS_PER_WORD to HOST_BITS_PER_WIDE_INT */ case GE: - if (const_val + if ((const_val & max_val) != (((HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (GET_MODE (op0)) - 1)))) code = GT, op1 = GEN_INT (const_val - 1); break; case LEU: - if (uconst_val != max_val) + if (uconst_val < max_val) code = LTU, op1 = GEN_INT (uconst_val + 1); break; |