OSDN Git Service

PR target/17119.
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Aug 2004 13:03:02 +0000 (13:03 +0000)
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Aug 2004 13:03:02 +0000 (13:03 +0000)
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)

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86619 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/m32r/m32r.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr17119.c [new file with mode: 0644]

index a91c1a8..e47b407 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-26  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
+
+       PR target/17119.
+       * config/m32r.c (gen_compare): Use reg_or_int16_operand when
+       checking for a valid constant, regardless of sign.
+
 2004-08-25  Richard Henderson  <rth@redhat.com>
 
         PR target/16974
index ca4079f..9e3404a 100644 (file)
@@ -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);
        }
index cfce6da..e6674bf 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-26  Nick Clifton  <nickc@redhat.com>
+
+       * gcc.c-torture/compile/pr17119.c: New test.
+
 2004-08-26  Joseph S. Myers  <jsm@polyomino.org.uk>
 
        * gcc.dg/c90-typespec-1.c, gcc.dg/c99-typespec-1.c: New tests.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr17119.c b/gcc/testsuite/gcc.c-torture/compile/pr17119.c
new file mode 100644 (file)
index 0000000..28d6ccb
--- /dev/null
@@ -0,0 +1,19 @@
+void
+_mesa_DrawPixels (int width, int height, unsigned format,
+                 unsigned type, const void * pixels)
+{
+  switch (format)
+    {
+    case 0x1900:
+      func1 ();
+      break;
+    case 0x1907:
+    case 0x80E0:
+    case 0x1908:
+    case 0x80E1:
+    case 0x8000:
+      func2 ();
+      break;
+    }
+}
+