aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/m32r/m32r.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@gcc.gnu.org>2004-08-26 13:03:02 +0000
committerNick Clifton <nickc@gcc.gnu.org>2004-08-26 13:03:02 +0000
commitb72e46f0007c0fe09a47ffd8113b03636fa505fe (patch)
tree2436ebe0e50d1b001d4f6922d209fa1a8058f6c2 /gcc/config/m32r/m32r.c
parented8e443a4279eca1faf6b81612c08e2b84430e4f (diff)
downloadgcc-b72e46f0007c0fe09a47ffd8113b03636fa505fe.zip
gcc-b72e46f0007c0fe09a47ffd8113b03636fa505fe.tar.gz
gcc-b72e46f0007c0fe09a47ffd8113b03636fa505fe.tar.bz2
re PR target/17119 ([m32r] ICE at switch case 0x8000)
PR target/17119. config/m32r.c (gen_compare): Use reg_or_int16_operand when checking for a valid constant, regardless of sign. testsuite/gcc.c-torture/compile/pr17119.c: New test (for this failure) From-SVN: r86619
Diffstat (limited to 'gcc/config/m32r/m32r.c')
-rw-r--r--gcc/config/m32r/m32r.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index ca4079f..9e3404a 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -1174,11 +1174,8 @@ gen_compare (enum rtx_code code, rtx x, rtx y, int need_compare)
y = force_reg (GET_MODE (x), y);
else
{
- int ok_const =
- (code == LTU || code == LEU || code == GTU || code == GEU)
- ? uint16_operand (y, GET_MODE (y))
- : reg_or_cmp_int16_operand (y, GET_MODE (y));
-
+ int ok_const = reg_or_int16_operand (y, GET_MODE (y));
+
if (! ok_const)
y = force_reg (GET_MODE (x), y);
}