+2015-06-30 Richard Sandiford <richard.sandiford@arm.com>
+
+ * target-insns.def (jump): New targetm instruction pattern.
+ * bb-reorder.c (get_uncond_jump_length): Use targetm.gen_jump
+ instead of gen_jump.
+ (fix_up_crossing_landing_pad): Likewise.
+ (add_labels_and_missing_jumps): Likewise.
+ (fix_crossing_conditional_branches): Likewise.
+ * cfgrtl.c (try_redirect_by_replacing_jump): Likewise.
+ (force_nonfallthru_and_redirect): Likewise.
+ * cse.c (cse_insn): Likewise.
+ * expmed.c (expand_divmod): Likewise.
+ * expr.c (store_expr_with_bounds, expand_expr_real_2): Likewise.
+ * haifa-sched.c (init_before_recovery): Likewise.
+ (sched_create_recovery_edges): Likewise.
+ * ifcvt.c (find_cond_trap): Likewise.
+ * optabs.c (expand_doubleword_shift, expand_doubleword_clz): Likewise.
+ (expand_float, expand_fix): Likewise.
+ * stmt.c (emit_jump): Likewise.
+
2015-06-30 Richard Sandiford <richard.sandiford@arm.com>
* defaults.h (HAVE_load_multiple, gen_load_multiple)
start_sequence ();
rtx_code_label *label = emit_label (gen_label_rtx ());
- rtx_insn *jump = emit_jump_insn (gen_jump (label));
+ rtx_insn *jump = emit_jump_insn (targetm.gen_jump (label));
length = get_attr_min_length (jump);
end_sequence ();
post_bb = BLOCK_FOR_INSN (old_lp->landing_pad);
post_bb = single_succ (post_bb);
rtx_code_label *post_label = block_label (post_bb);
- jump = emit_jump_insn (gen_jump (post_label));
+ jump = emit_jump_insn (targetm.gen_jump (post_label));
JUMP_LABEL (jump) = post_label;
/* Create new basic block to be dest for lp. */
/* Make sure there's only one successor. */
gcc_assert (single_succ_p (src));
- new_jump = emit_jump_insn_after (gen_jump (label), BB_END (src));
+ new_jump = emit_jump_insn_after (targetm.gen_jump (label), BB_END (src));
BB_END (src) = new_jump;
JUMP_LABEL (new_jump) = label;
LABEL_NUSES (label) += 1;
gcc_assert (GET_CODE (old_label) == LABEL_REF);
old_jump_target = old_jump_insn->jump_target ();
new_jump = as_a <rtx_jump_insn *>
- (emit_jump_insn (gen_jump (old_jump_target)));
+ (emit_jump_insn (targetm.gen_jump (old_jump_target)));
new_jump->set_jump_target (old_jump_target);
last_bb = EXIT_BLOCK_PTR_FOR_FN (cfun)->prev_bb;
rtx label;
rtx_jump_table_data *table;
- emit_jump_insn_after_noloc (gen_jump (target_label), insn);
+ emit_jump_insn_after_noloc (targetm.gen_jump (target_label), insn);
JUMP_LABEL (BB_END (src)) = target_label;
LABEL_NUSES (target_label)++;
if (dump_file)
else
{
rtx_code_label *label = block_label (target);
- emit_jump_insn_after_setloc (gen_jump (label), BB_END (jump_block), loc);
+ emit_jump_insn_after_setloc (targetm.gen_jump (label),
+ BB_END (jump_block), loc);
JUMP_LABEL (BB_END (jump_block)) = label;
LABEL_NUSES (label)++;
}
rtx_jump_insn *new_rtx;
rtx note;
- new_rtx = emit_jump_insn_before (gen_jump (XEXP (src, 0)), insn);
+ rtx_insn *seq = targetm.gen_jump (XEXP (src, 0));
+ new_rtx = emit_jump_insn_before (seq, insn);
JUMP_LABEL (new_rtx) = XEXP (src, 0);
LABEL_NUSES (XEXP (src, 0))++;
quotient, 0, OPTAB_LIB_WIDEN);
if (tem != quotient)
emit_move_insn (quotient, tem);
- emit_jump_insn (gen_jump (label5));
+ emit_jump_insn (targetm.gen_jump (label5));
emit_barrier ();
emit_label (label1);
expand_inc (adjusted_op0, const1_rtx);
- emit_jump_insn (gen_jump (label4));
+ emit_jump_insn (targetm.gen_jump (label4));
emit_barrier ();
emit_label (label2);
do_cmp_and_jump (adjusted_op0, const0_rtx, GT, compute_mode, label3);
quotient, 0, OPTAB_LIB_WIDEN);
if (tem != quotient)
emit_move_insn (quotient, tem);
- emit_jump_insn (gen_jump (label5));
+ emit_jump_insn (targetm.gen_jump (label5));
emit_barrier ();
emit_label (label3);
expand_dec (adjusted_op0, const1_rtx);
do_cmp_and_jump (adjusted_op0, const0_rtx, NE,
compute_mode, label1);
emit_move_insn (quotient, const0_rtx);
- emit_jump_insn (gen_jump (label2));
+ emit_jump_insn (targetm.gen_jump (label2));
emit_barrier ();
emit_label (label1);
expand_dec (adjusted_op0, const1_rtx);
quotient, 0, OPTAB_LIB_WIDEN);
if (tem != quotient)
emit_move_insn (quotient, tem);
- emit_jump_insn (gen_jump (label5));
+ emit_jump_insn (targetm.gen_jump (label5));
emit_barrier ();
emit_label (label1);
expand_dec (adjusted_op0, const1_rtx);
- emit_jump_insn (gen_jump (label4));
+ emit_jump_insn (targetm.gen_jump (label4));
emit_barrier ();
emit_label (label2);
do_cmp_and_jump (adjusted_op0, const0_rtx, LT,
quotient, 0, OPTAB_LIB_WIDEN);
if (tem != quotient)
emit_move_insn (quotient, tem);
- emit_jump_insn (gen_jump (label5));
+ emit_jump_insn (targetm.gen_jump (label5));
emit_barrier ();
emit_label (label3);
expand_inc (adjusted_op0, const1_rtx);
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,
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,
EDGE_FALLTHRU);
rtx_code_label *label = block_label (empty);
- rtx_jump_insn *x = emit_jump_insn_after (gen_jump (label),
+ rtx_jump_insn *x = emit_jump_insn_after (targetm.gen_jump (label),
BB_END (single));
JUMP_LABEL (x) = label;
LABEL_NUSES (label)++;
make_edge (first_bb, rec, edge_flags);
rtx_code_label *label = block_label (second_bb);
- rtx_jump_insn *jump = emit_jump_insn_after (gen_jump (label), BB_END (rec));
+ rtx_jump_insn *jump = emit_jump_insn_after (targetm.gen_jump (label),
+ BB_END (rec));
JUMP_LABEL (jump) = label;
LABEL_NUSES (label)++;
single_succ_edge (test_bb)->flags |= EDGE_FALLTHRU;
else if (trap_bb == then_bb)
{
- rtx lab;
-
- lab = JUMP_LABEL (jump);
- rtx_jump_insn *newjump = emit_jump_insn_after (gen_jump (lab), jump);
+ rtx lab = JUMP_LABEL (jump);
+ rtx_insn *seq = targetm.gen_jump (lab);
+ rtx_jump_insn *newjump = emit_jump_insn_after (seq, jump);
LABEL_NUSES (lab) += 1;
JUMP_LABEL (newjump) = lab;
emit_barrier_after (newjump);
unsignedp, methods))
return false;
- emit_jump_insn (gen_jump (done_label));
+ emit_jump_insn (targetm.gen_jump (done_label));
emit_barrier ();
emit_label (subword_label);
if (temp != result)
convert_move (result, temp, true);
- emit_jump_insn (gen_jump (after_label));
+ emit_jump_insn (targetm.gen_jump (after_label));
emit_barrier ();
/* Else clz of the full value is clz of the low word plus the number
/* The sign bit is not set. Convert as signed. */
expand_float (target, from, 0);
- emit_jump_insn (gen_jump (label));
+ emit_jump_insn (targetm.gen_jump (label));
emit_barrier ();
/* The sign bit is set.
/* If not, do the signed "fix" and branch around fixup code. */
expand_fix (to, from, 0);
- emit_jump_insn (gen_jump (lab2));
+ emit_jump_insn (targetm.gen_jump (lab2));
emit_barrier ();
/* Otherwise, subtract 2**(N-1), convert to signed number,
emit_jump (rtx label)
{
do_pending_stack_adjust ();
- emit_jump_insn (gen_jump (label));
+ emit_jump_insn (targetm.gen_jump (label));
emit_barrier ();
}
\f
Instructions should be documented in md.texi rather than here. */
DEF_TARGET_INSN (canonicalize_funcptr_for_compare, (rtx x0, rtx x1))
DEF_TARGET_INSN (epilogue, (void))
+DEF_TARGET_INSN (jump, (rtx x0))
DEF_TARGET_INSN (load_multiple, (rtx x0, rtx x1, rtx x2))
DEF_TARGET_INSN (mem_signal_fence, (rtx x0))
DEF_TARGET_INSN (mem_thread_fence, (rtx x0))