summaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-12 08:45:27 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-12 08:45:27 +0000
commit6b2e6e3347b155a61200ebed36ec53b5043c98bf (patch)
treeee66bf6f85df2b3be6eff488406f296b98a0eafa /gcc/recog.c
parentbce49ba48eac50ef8a5b06cd5d57db9bb99570f2 (diff)
downloadgcc-6b2e6e3347b155a61200ebed36ec53b5043c98bf.tar.gz
2012-11-12 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 193426 using svnmerge.py git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@193427 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 3a534551345..47e7f75e1dd 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -578,8 +578,7 @@ simplify_while_replacing (rtx *loc, rtx to, rtx object,
(PLUS, GET_MODE (x), XEXP (x, 0), XEXP (x, 1)), 1);
break;
case MINUS:
- if (CONST_INT_P (XEXP (x, 1))
- || CONST_DOUBLE_AS_INT_P (XEXP (x, 1)))
+ if (CONST_SCALAR_INT_P (XEXP (x, 1)))
validate_change (object, loc,
simplify_gen_binary
(PLUS, GET_MODE (x), XEXP (x, 0),
@@ -1730,7 +1729,7 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints)
break;
case 's':
- if (CONST_INT_P (op) || CONST_DOUBLE_AS_INT_P (op))
+ if (CONST_SCALAR_INT_P (op))
break;
/* Fall through. */
@@ -1740,7 +1739,7 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints)
break;
case 'n':
- if (CONST_INT_P (op) || CONST_DOUBLE_AS_INT_P (op))
+ if (CONST_SCALAR_INT_P (op))
result = 1;
break;
@@ -1943,6 +1942,9 @@ offsettable_address_addr_space_p (int strictp, enum machine_mode mode, rtx y,
(strictp ? strict_memory_address_addr_space_p
: memory_address_addr_space_p);
unsigned int mode_sz = GET_MODE_SIZE (mode);
+#ifdef POINTERS_EXTEND_UNSIGNED
+ enum machine_mode pointer_mode = targetm.addr_space.pointer_mode (as);
+#endif
if (CONSTANT_ADDRESS_P (y))
return 1;
@@ -1992,6 +1994,15 @@ offsettable_address_addr_space_p (int strictp, enum machine_mode mode, rtx y,
z = gen_rtx_LO_SUM (GET_MODE (y), XEXP (y, 0),
plus_constant (GET_MODE (y), XEXP (y, 1),
mode_sz - 1));
+#ifdef POINTERS_EXTEND_UNSIGNED
+ /* Likewise for a ZERO_EXTEND from pointer_mode. */
+ else if (POINTERS_EXTEND_UNSIGNED > 0
+ && GET_CODE (y) == ZERO_EXTEND
+ && GET_MODE (XEXP (y, 0)) == pointer_mode)
+ z = gen_rtx_ZERO_EXTEND (GET_MODE (y),
+ plus_constant (pointer_mode, XEXP (y, 0),
+ mode_sz - 1));
+#endif
else
z = plus_constant (GET_MODE (y), y, mode_sz - 1);
@@ -2596,7 +2607,7 @@ constrain_operands (int strict)
break;
case 's':
- if (CONST_INT_P (op) || CONST_DOUBLE_AS_INT_P (op))
+ if (CONST_SCALAR_INT_P (op))
break;
case 'i':
if (CONSTANT_P (op))
@@ -2604,7 +2615,7 @@ constrain_operands (int strict)
break;
case 'n':
- if (CONST_INT_P (op) || CONST_DOUBLE_AS_INT_P (op))
+ if (CONST_SCALAR_INT_P (op))
win = 1;
break;