if (pass && (flags & ECF_LIBCALL_BLOCK))
{
rtx insns;
+ rtx insn;
+ bool failed = valreg == 0 || GET_CODE (valreg) == PARALLEL;
- if (valreg == 0 || GET_CODE (valreg) == PARALLEL)
+ insns = get_insns ();
+
+ /* Expansion of block moves possibly introduced a loop that may
+ not appear inside libcall block. */
+ for (insn = insns; insn; insn = NEXT_INSN (insn))
+ if (GET_CODE (insn) == JUMP_INSN)
+ failed = true;
+
+ if (failed)
{
- insns = get_insns ();
end_sequence ();
emit_insn (insns);
}
args[i].initial_value, note);
note = gen_rtx_EXPR_LIST (VOIDmode, funexp, note);
- insns = get_insns ();
end_sequence ();
if (flags & ECF_PURE)
argvec[argnum].locate.offset.constant);
rtx stack_area
= gen_rtx_MEM (save_mode, memory_address (save_mode, adr));
- argvec[argnum].save_area = gen_reg_rtx (save_mode);
- emit_move_insn (argvec[argnum].save_area, stack_area);
+ if (save_mode == BLKmode)
+ {
+ argvec[argnum].save_area
+ = assign_stack_temp (BLKmode,
+ argvec[argnum].locate.size.constant,
+ 0);
+
+ emit_block_move (validize_mem (argvec[argnum].save_area),
+ stack_area,
+ GEN_INT (argvec[argnum].locate.size.constant),
+ BLOCK_OP_CALL_PARM);
+ }
+ else
+ {
+ argvec[argnum].save_area = gen_reg_rtx (save_mode);
+
+ emit_move_insn (argvec[argnum].save_area, stack_area);
+ }
}
}
rtx stack_area = gen_rtx_MEM (save_mode,
memory_address (save_mode, adr));
- emit_move_insn (stack_area, argvec[count].save_area);
+ if (save_mode == BLKmode)
+ emit_block_move (stack_area,
+ validize_mem (argvec[count].save_area),
+ GEN_INT (argvec[count].locate.size.constant),
+ BLOCK_OP_CALL_PARM);
+ else
+ emit_move_insn (stack_area, argvec[count].save_area);
}
highest_outgoing_arg_in_use = initial_highest_arg_in_use;
basic_block jump_block, jump_dest_block, cbranch_dest_block;
edge cbranch_jump_edge, cbranch_fallthru_edge;
rtx cbranch_insn;
+ rtx insn, next;
+ rtx end;
/* Verify that there are exactly two successors. */
if (!cbranch_block->succ
cbranch_fallthru_edge->flags &= ~EDGE_FALLTHRU;
update_br_prob_note (cbranch_block);
+ end = jump_block->end;
+ /* Deleting a block may produce unreachable code warning even when we are
+ not deleting anything live. Supress it by moving all the line number
+ notes out of the block. */
+ for (insn = jump_block->head; insn != NEXT_INSN (jump_block->end);
+ insn = next)
+ {
+ next = NEXT_INSN (insn);
+ if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) > 0)
+ {
+ reorder_insns (insn, insn, end);
+ end = insn;
+ }
+ }
/* Delete the block with the unconditional jump, and clean up the mess. */
delete_block (jump_block);
tidy_fallthru_edge (cbranch_jump_edge, cbranch_block, cbranch_dest_block);