diff options
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 408ae1a7a1f..5c0df44248d 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1491,10 +1491,6 @@ emit_block_move_via_loop (rtx x, rtx y, rtx size, void move_block_to_reg (int regno, rtx x, int nregs, machine_mode mode) { - int i; - rtx pat; - rtx_insn *last; - if (nregs == 0) return; @@ -1502,12 +1498,12 @@ move_block_to_reg (int regno, rtx x, int nregs, machine_mode mode) x = validize_mem (force_const_mem (mode, x)); /* See if the machine can do this with a load multiple insn. */ - if (HAVE_load_multiple) + if (targetm.have_load_multiple ()) { - last = get_last_insn (); - pat = gen_load_multiple (gen_rtx_REG (word_mode, regno), x, - GEN_INT (nregs)); - if (pat) + rtx_insn *last = get_last_insn (); + rtx first = gen_rtx_REG (word_mode, regno); + if (rtx_insn *pat = targetm.gen_load_multiple (first, x, + GEN_INT (nregs))) { emit_insn (pat); return; @@ -1516,7 +1512,7 @@ move_block_to_reg (int regno, rtx x, int nregs, machine_mode mode) delete_insns_since (last); } - for (i = 0; i < nregs; i++) + for (int i = 0; i < nregs; i++) emit_move_insn (gen_rtx_REG (word_mode, regno + i), operand_subword_force (x, i, mode)); } @@ -1527,18 +1523,16 @@ move_block_to_reg (int regno, rtx x, int nregs, machine_mode mode) void move_block_from_reg (int regno, rtx x, int nregs) { - int i; - if (nregs == 0) return; /* See if the machine can do this with a store multiple insn. */ - if (HAVE_store_multiple) + if (targetm.have_store_multiple ()) { rtx_insn *last = get_last_insn (); - rtx pat = gen_store_multiple (x, gen_rtx_REG (word_mode, regno), - GEN_INT (nregs)); - if (pat) + rtx first = gen_rtx_REG (word_mode, regno); + if (rtx_insn *pat = targetm.gen_store_multiple (x, first, + GEN_INT (nregs))) { emit_insn (pat); return; @@ -1547,7 +1541,7 @@ move_block_from_reg (int regno, rtx x, int nregs) delete_insns_since (last); } - for (i = 0; i < nregs; i++) + for (int i = 0; i < nregs; i++) { rtx tem = operand_subword (x, i, 1, BLKmode); @@ -5274,7 +5268,7 @@ store_expr_with_bounds (tree exp, rtx target, int call_param_p, jumpifnot (TREE_OPERAND (exp, 0), lab1, -1); store_expr_with_bounds (TREE_OPERAND (exp, 1), target, call_param_p, nontemporal, btarget); - emit_jump_insn (gen_jump (lab2)); + emit_jump_insn (targetm.gen_jump (lab2)); emit_barrier (); emit_label (lab1); store_expr_with_bounds (TREE_OPERAND (exp, 2), target, call_param_p, @@ -8916,7 +8910,7 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode, return temp; /* Use a compare and a jump for BLKmode comparisons, or for function - type comparisons is HAVE_canonicalize_funcptr_for_compare. */ + type comparisons is have_canonicalize_funcptr_for_compare. */ if ((target == 0 || modifier == EXPAND_STACK_PARM @@ -9206,7 +9200,7 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode, modifier == EXPAND_STACK_PARM, false); - emit_jump_insn (gen_jump (lab1)); + emit_jump_insn (targetm.gen_jump (lab1)); emit_barrier (); emit_label (lab0); store_expr (treeop2, temp, @@ -10920,8 +10914,7 @@ do_store_flag (sepops ops, rtx target, machine_mode mode) /* We won't bother with store-flag operations involving function pointers when function pointers must be canonicalized before comparisons. */ -#ifdef HAVE_canonicalize_funcptr_for_compare - if (HAVE_canonicalize_funcptr_for_compare + if (targetm.have_canonicalize_funcptr_for_compare () && ((TREE_CODE (TREE_TYPE (arg0)) == POINTER_TYPE && (TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == FUNCTION_TYPE)) @@ -10929,7 +10922,6 @@ do_store_flag (sepops ops, rtx target, machine_mode mode) && (TREE_CODE (TREE_TYPE (TREE_TYPE (arg1))) == FUNCTION_TYPE)))) return 0; -#endif STRIP_NOPS (arg0); STRIP_NOPS (arg1); |