Validate the new value vs the insn predicate. Note that
asm insns will have insn_code -1 here. */
if (!safe_insn_predicate (insn_code, i, x))
- x = force_reg (insn_data[insn_code].operand[i].mode, x);
+ {
+ start_sequence ();
+ x = force_reg (insn_data[insn_code].operand[i].mode, x);
+ seq = get_insns ();
+ end_sequence ();
+ if (seq)
+ emit_insn_before (seq, insn);
+ }
*recog_data.operand_loc[i] = recog_data.operand[i] = x;
any_change = true;
instantiate_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
{
tree t = *tp;
- if (! EXPR_P (t))
+ if (! EXPR_P (t) && ! GIMPLE_STMT_P (t))
{
*walk_subtrees = 0;
if (DECL_P (t) && DECL_RTL_SET_P (t))
t = built_in_decls[BUILT_IN_ALLOCA];
t = build_function_call_expr (t, args);
t = fold_convert (ptr_type, t);
- t = build2 (MODIFY_EXPR, void_type_node, addr, t);
+ t = build2 (GIMPLE_MODIFY_STMT, void_type_node, addr, t);
gimplify_and_add (t, &stmts);
}
- t = build2 (MODIFY_EXPR, void_type_node, local, parm);
+ t = build2 (GIMPLE_MODIFY_STMT, void_type_node, local, parm);
gimplify_and_add (t, &stmts);
SET_DECL_VALUE_EXPR (parm, local);
clear_pending_stack_adjust ();
do_pending_stack_adjust ();
- /* Mark the end of the function body.
- If control reaches this insn, the function can drop through
- without returning a value. */
- emit_note (NOTE_INSN_FUNCTION_END);
-
/* Output a linenumber for the end of the function.
SDB depends on this. */
force_next_line_note ();
/* Similarly, move any line notes that appear after the epilogue.
There is no need, however, to be quite so anal about the existence
- of such a note. Also move the NOTE_INSN_FUNCTION_END and (possibly)
+ of such a note. Also possibly move
NOTE_INSN_FUNCTION_BEG notes, as those can be relevant for debug
info generation. */
for (insn = epilogue_end; insn; insn = next)
{
next = NEXT_INSN (insn);
if (NOTE_P (insn)
- && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG
- || NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_END))
+ && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG))
reorder_insns (insn, insn, PREV_INSN (epilogue_end));
}
}