Commit 3a6cc978 by Zack Weinberg Committed by Zack Weinberg

reg-stack.c (emit_swap_insn): Do not put a new insn before a NOTE_BASIC_BLOCK.

	* reg-stack.c (emit_swap_insn): Do not put a new insn before a
	NOTE_BASIC_BLOCK.

From-SVN: r32027
parent d48120fe
2000-02-16 Zack Weinberg <zack@wolery.cumb.org> 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, * flow.c (dump_regset, debug_regset, dump_bb, debug_bb,
debug_bb_n): New functions. debug_bb_n): New functions.
(dump_flow_info, print_rtl_with_bb): Use dump_regset. (dump_flow_info, print_rtl_with_bb): Use dump_regset.
......
...@@ -973,7 +973,8 @@ emit_swap_insn (insn, regstack, reg) ...@@ -973,7 +973,8 @@ emit_swap_insn (insn, regstack, reg)
if (current_block && insn != current_block->head) if (current_block && insn != current_block->head)
{ {
rtx tmp = PREV_INSN (insn); 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 if (GET_CODE (tmp) == CODE_LABEL
|| (GET_CODE (tmp) == NOTE || (GET_CODE (tmp) == NOTE
...@@ -1017,10 +1018,7 @@ emit_swap_insn (insn, regstack, reg) ...@@ -1017,10 +1018,7 @@ emit_swap_insn (insn, regstack, reg)
if (i1) if (i1)
emit_block_insn_after (swap_rtx, i1, current_block); emit_block_insn_after (swap_rtx, i1, current_block);
else if (current_block) else if (current_block)
{ emit_block_insn_before (swap_rtx, current_block->head, current_block);
i1 = emit_insn_before (swap_rtx, current_block->head);
current_block->head = i1;
}
else else
emit_insn_before (swap_rtx, insn); emit_insn_before (swap_rtx, insn);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment