diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2011-03-21 21:38:56 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2011-03-21 21:38:56 +0000 |
commit | 2ef6ce06d335810dd893c2c6935bbfc84e88dda7 (patch) | |
tree | 0538178eac12adad63a9e0919a608a535b270ab9 /gcc/reload.c | |
parent | 9a96da32eb7370b930a170579725de2f2ee2f4e2 (diff) | |
download | gcc-2ef6ce06d335810dd893c2c6935bbfc84e88dda7.zip gcc-2ef6ce06d335810dd893c2c6935bbfc84e88dda7.tar.gz gcc-2ef6ce06d335810dd893c2c6935bbfc84e88dda7.tar.bz2 |
expr.h (prepare_operand): Move to...
gcc/
2011-03-21 Richard Sandiford <richard.sandiford@linaro.org>
* expr.h (prepare_operand): Move to...
* optabs.h (prepare_operand): ...here and change the insn code
parameter from "int" to "enum insn_code".
(insn_operand_matches): Declare.
* expr.c (init_expr_target): Use insn_operand_matches.
(compress_float_constant): Likewise.
* function.c (safe_insn_predicate, assign_parm_setup_reg): Likewise.
* optabs.c (can_compare_p, prepare_cmp_insn): Likewise.
(emit_cmp_and_jump_insn_1, gen_add2_insn, gen_add3_insn): Likewise.
(have_add2_insn, gen_sub2_insn, gen_sub3_insn, have_sub2_insn): Likewise.
(gen_cond_trap): Likewise.
(prepare_operand): Likewise. Change icode to an insn_code.
(insn_operand_matches): New function.
* reload.c (find_reloads_address_1): Use insn_operand_matches.
* reload1.c (gen_reload): Likewise.
* targhooks.c (default_secondary_reload): Likewise.
From-SVN: r171270
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 714355c3..7c8d78e 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -5819,17 +5819,15 @@ find_reloads_address_1 (enum machine_mode mode, rtx x, int context, rtx equiv = (MEM_P (XEXP (x, 0)) ? XEXP (x, 0) : reg_equiv_mem[regno]); - int icode = (int) optab_handler (add_optab, GET_MODE (x)); + enum insn_code icode = optab_handler (add_optab, GET_MODE (x)); if (insn && NONJUMP_INSN_P (insn) && equiv && memory_operand (equiv, GET_MODE (equiv)) #ifdef HAVE_cc0 && ! sets_cc0_p (PATTERN (insn)) #endif && ! (icode != CODE_FOR_nothing - && ((*insn_data[icode].operand[0].predicate) - (equiv, GET_MODE (x))) - && ((*insn_data[icode].operand[1].predicate) - (equiv, GET_MODE (x))))) + && insn_operand_matches (icode, 0, equiv) + && insn_operand_matches (icode, 1, equiv))) { /* We use the original pseudo for loc, so that emit_reload_insns() knows which pseudo this |