From 34536f93eb929d873f56f852c53fa9f0dfc290c6 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Mon, 9 Nov 1992 20:07:35 +0000 Subject: [PATCH] (save_call_clobbered_regs): Ensure any insns we add are in the same basic block as the insn we added them for. From-SVN: r2726 --- gcc/caller-save.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/caller-save.c b/gcc/caller-save.c index 4c921599974..f77eda9ae06 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -374,6 +374,7 @@ save_call_clobbered_regs (insn_mode) for (b = 0; b < n_basic_blocks; b++) { regset regs_live = basic_block_live_at_start[b]; + rtx prev_block_last = PREV_INSN (basic_block_head[b]); REGSET_ELT_TYPE bit; int offset, i, j; int regno; @@ -490,6 +491,9 @@ save_call_clobbered_regs (insn_mode) ? insn : NEXT_INSN (insn)), 0, regno, insn_mode, MOVE_MAX / UNITS_PER_WORD); + /* If we added any insns at the start of the block, update the start + of the block to point at those insns. */ + basic_block_head[b] = NEXT_INSN (prev_block_last); } } -- 2.30.2