2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
+ * reg-stack.c (emit_swap_insn): Do not put a new insn before a
+ NOTE_BASIC_BLOCK.
+
* flow.c (dump_regset, debug_regset, dump_bb, debug_bb,
debug_bb_n): New functions.
(dump_flow_info, print_rtl_with_bb): Use dump_regset.
if (current_block && insn != current_block->head)
{
rtx tmp = PREV_INSN (insn);
- while (tmp != current_block->head)
+ rtx limit = PREV_INSN (current_block->head);
+ while (tmp != limit)
{
if (GET_CODE (tmp) == CODE_LABEL
|| (GET_CODE (tmp) == NOTE
if (i1)
emit_block_insn_after (swap_rtx, i1, current_block);
else if (current_block)
- {
- i1 = emit_insn_before (swap_rtx, current_block->head);
- current_block->head = i1;
- }
+ emit_block_insn_before (swap_rtx, current_block->head, current_block);
else
emit_insn_before (swap_rtx, insn);
}