diff options
author | Shujing Zhao <pearly.zhao@oracle.com> | 2009-06-22 10:29:13 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2009-06-22 10:29:13 +0000 |
commit | 481683e1d53b27779b31c1816606eb17975a9b1f (patch) | |
tree | 11fcb232ab948e07b794c4b08b2ffbb2030069f7 /gcc/recog.c | |
parent | eee37e909a5c74641d08eff71739ca9e089861f4 (diff) | |
download | gcc-481683e1d53b27779b31c1816606eb17975a9b1f.zip gcc-481683e1d53b27779b31c1816606eb17975a9b1f.tar.gz gcc-481683e1d53b27779b31c1816606eb17975a9b1f.tar.bz2 |
alias.c: Use REG_P...
2009-06-22 Shujing Zhao <pearly.zhao@oracle.com>
* alias.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P, CALL_P, NOTE_P and
JUMP_TABLE_DATA_P predicates where applicable.
* auto-inc-dec.c: Ditto.
* builtins.c: Ditto.
* caller-save.c: Ditto.
* calls.c: Ditto.
* cfgcleanup.c: Ditto.
* cfglayout.c: Ditto.
* cfgrtl.c: Ditto.
* combine.c: Ditto.
* combine-stack-adj.c: Ditto.
* cse.c: Ditto.
* cselib.c: Ditto.
* dbxout.c: Ditto.
* df-scan.c: Ditto.
* dse.c: Ditto.
* dwarf2asm.c: Ditto.
* dwarf2out.c: Ditto.
* emit-rtl.c: Ditto.
* except.c: Ditto.
* explow.c: Ditto.
* expmed.c: Ditto.
* expr.c: Ditto.
* final.c: Ditto.
* function.c: Ditto.
* fwprop.c: Ditto.
* gcse.c: Ditto.
* genpreds.c: Ditto.
* genrecog.c: Ditto.
* ifcvt.c: Ditto.
* ira-costs.c: Ditto.
* ira-lives.c: Ditto.
* jump.c: Ditto.
* loop-iv.c: Ditto.
* lower-subreg.c: Ditto.
* modulo-sched.c: Ditto.
* optabs.c: Ditto.
* postreload.c: Ditto.
* print-rtl.c: Ditto.
* recog.c: Ditto.
* reginfo.c: Ditto.
* regmove.c: Ditto.
* reload1.c: Ditto.
* reload.c: Ditto.
* reorg.c: Ditto.
* rtlanal.c: Ditto.
* rtl.c: Ditto.
* sched-vis.c: Ditto.
* sdbout.c: Ditto.
* sel-sched-ir.c: Ditto.
* simplify-rtx.c: Ditto.
* targhooks.c: Ditto.
* var-tracking.c: Ditto.
* vmsdbgout.c: Ditto.
From-SVN: r148786
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 4ee52af..9b88c66 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -550,13 +550,13 @@ simplify_while_replacing (rtx *loc, rtx to, rtx object, simplify_gen_binary to try to simplify it. ??? We may want later to remove this, once simplification is separated from this function. */ - if (GET_CODE (XEXP (x, 1)) == CONST_INT && XEXP (x, 1) == to) + if (CONST_INT_P (XEXP (x, 1)) && XEXP (x, 1) == to) validate_change (object, loc, simplify_gen_binary (PLUS, GET_MODE (x), XEXP (x, 0), XEXP (x, 1)), 1); break; case MINUS: - if (GET_CODE (XEXP (x, 1)) == CONST_INT + if (CONST_INT_P (XEXP (x, 1)) || GET_CODE (XEXP (x, 1)) == CONST_DOUBLE) validate_change (object, loc, simplify_gen_binary @@ -597,8 +597,8 @@ simplify_while_replacing (rtx *loc, rtx to, rtx object, happen, we might just fail in some cases). */ if (MEM_P (XEXP (x, 0)) - && GET_CODE (XEXP (x, 1)) == CONST_INT - && GET_CODE (XEXP (x, 2)) == CONST_INT + && CONST_INT_P (XEXP (x, 1)) + && CONST_INT_P (XEXP (x, 2)) && !mode_dependent_address_p (XEXP (XEXP (x, 0), 0)) && !MEM_VOLATILE_P (XEXP (x, 0))) { @@ -901,7 +901,7 @@ general_operand (rtx op, enum machine_mode mode) && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT) return 0; - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && mode != VOIDmode && trunc_int_for_mode (INTVAL (op), mode) != INTVAL (op)) return 0; @@ -1078,7 +1078,7 @@ immediate_operand (rtx op, enum machine_mode mode) && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT) return 0; - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && mode != VOIDmode && trunc_int_for_mode (INTVAL (op), mode) != INTVAL (op)) return 0; @@ -1095,7 +1095,7 @@ immediate_operand (rtx op, enum machine_mode mode) int const_int_operand (rtx op, enum machine_mode mode) { - if (GET_CODE (op) != CONST_INT) + if (!CONST_INT_P (op)) return 0; if (mode != VOIDmode @@ -1118,7 +1118,7 @@ const_double_operand (rtx op, enum machine_mode mode) && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT) return 0; - return ((GET_CODE (op) == CONST_DOUBLE || GET_CODE (op) == CONST_INT) + return ((GET_CODE (op) == CONST_DOUBLE || CONST_INT_P (op)) && (mode == VOIDmode || GET_MODE (op) == mode || GET_MODE (op) == VOIDmode)); } @@ -1145,7 +1145,7 @@ nonmemory_operand (rtx op, enum machine_mode mode) && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT) return 0; - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && mode != VOIDmode && trunc_int_for_mode (INTVAL (op), mode) != INTVAL (op)) return 0; @@ -1212,7 +1212,7 @@ push_operand (rtx op, enum machine_mode mode) if (GET_CODE (op) != PRE_MODIFY || GET_CODE (XEXP (op, 1)) != PLUS || XEXP (XEXP (op, 1), 0) != XEXP (op, 0) - || GET_CODE (XEXP (XEXP (op, 1), 1)) != CONST_INT + || !CONST_INT_P (XEXP (XEXP (op, 1), 1)) #ifdef STACK_GROWS_DOWNWARD || INTVAL (XEXP (XEXP (op, 1), 1)) != - (int) rounded_size #else @@ -1313,7 +1313,7 @@ indirect_operand (rtx op, enum machine_mode mode) return ((offset == 0 && general_operand (XEXP (inner, 0), Pmode)) || (GET_CODE (XEXP (inner, 0)) == PLUS - && GET_CODE (XEXP (XEXP (inner, 0), 1)) == CONST_INT + && CONST_INT_P (XEXP (XEXP (inner, 0), 1)) && INTVAL (XEXP (XEXP (inner, 0), 1)) == -offset && general_operand (XEXP (XEXP (inner, 0), 0), Pmode))); } @@ -1696,7 +1696,7 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints) break; case 's': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) || (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode)) break; @@ -1708,49 +1708,49 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints) break; case 'n': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) || (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode)) result = 1; break; case 'I': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'I', constraint)) result = 1; break; case 'J': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'J', constraint)) result = 1; break; case 'K': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'K', constraint)) result = 1; break; case 'L': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'L', constraint)) result = 1; break; case 'M': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'M', constraint)) result = 1; break; case 'N': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'N', constraint)) result = 1; break; case 'O': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'O', constraint)) result = 1; break; case 'P': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'P', constraint)) result = 1; break; @@ -2536,7 +2536,7 @@ constrain_operands (int strict) break; case 's': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) || (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode)) break; @@ -2546,7 +2546,7 @@ constrain_operands (int strict) break; case 'n': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) || (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode)) win = 1; @@ -2560,7 +2560,7 @@ constrain_operands (int strict) case 'N': case 'O': case 'P': - if (GET_CODE (op) == CONST_INT + if (CONST_INT_P (op) && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), c, p)) win = 1; break; |