aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2011-03-21 21:38:56 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2011-03-21 21:38:56 +0000
commit2ef6ce06d335810dd893c2c6935bbfc84e88dda7 (patch)
tree0538178eac12adad63a9e0919a608a535b270ab9 /gcc/expr.c
parent9a96da32eb7370b930a170579725de2f2ee2f4e2 (diff)
downloadgcc-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/expr.c')
-rw-r--r--gcc/expr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index dc8366d..64ddde7 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -286,7 +286,7 @@ init_expr_target (void)
PUT_MODE (mem, srcmode);
- if ((*insn_data[ic].operand[1].predicate) (mem, srcmode))
+ if (insn_operand_matches (ic, 1, mem))
float_extend_from_mem[mode][srcmode] = true;
}
}
@@ -3446,7 +3446,7 @@ compress_float_constant (rtx x, rtx y)
{
/* Skip if the target needs extra instructions to perform
the extension. */
- if (! (*insn_data[ic].operand[1].predicate) (trunc_y, srcmode))
+ if (!insn_operand_matches (ic, 1, trunc_y))
continue;
/* This is valid, but may not be cheaper than the original. */
newcost = rtx_cost (gen_rtx_FLOAT_EXTEND (dstmode, trunc_y), SET, speed);