summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-10 18:13:16 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-10 18:13:16 +0000
commit1c0f4b11c53fdd77e97319242c3f8350d44f024b (patch)
tree21612dc77ec5e5642131482984a5fd12fff71637
parent49a777295ba8cc66eaa996ceecd063dd0a8caf9f (diff)
downloadgcc-1c0f4b11c53fdd77e97319242c3f8350d44f024b.tar.gz
PR target/25718
* config/cris/cris.md ("uminsi3"): Don't use 8- or 16-bit sizes for a negative bound. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109548 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/config/cris/cris.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md
index 5665897ebf6..a6573195b44 100644
--- a/gcc/config/cris/cris.md
+++ b/gcc/config/cris/cris.md
@@ -2679,11 +2679,16 @@
{
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";