re PR target/25718 (invalid assembly for unsigned-minimum expressions.)
authorHans-Peter Nilsson <hp@gcc.gnu.org>
Tue, 10 Jan 2006 18:13:16 +0000 (18:13 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Tue, 10 Jan 2006 18:13:16 +0000 (18:13 +0000)
PR target/25718
* config/cris/cris.md ("uminsi3"): Don't use 8- or 16-bit sizes
for a negative bound.

From-SVN: r109548

gcc/config/cris/cris.md

index 5665897ebf6e2ec305a5b7c83aaa1565353b8268..a6573195b44dc57d6fcfd834bc992a5555ff6a8e 100644 (file)
 {
   if (GET_CODE (operands[2]) == CONST_INT)
     {
-      if (INTVAL (operands[2]) < 256)
-       return "bound.b %2,%0";
+      /* Constant operands are zero-extended, so only 32-bit operands
+        may be negative.  */
+      if (INTVAL (operands[2]) >= 0)
+       {
+         if (INTVAL (operands[2]) < 256)
+           return "bound.b %2,%0";
 
-      if (INTVAL (operands[2]) < 65536)
-       return "bound.w %2,%0";
+         if (INTVAL (operands[2]) < 65536)
+           return "bound.w %2,%0";
+       }
     }
   else if (which_alternative == 3)
     return "bound.d %2,%1,%0";