aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-11-09 20:07:35 +0000
committerRichard Stallman <rms@gnu.org>1992-11-09 20:07:35 +0000
commit34536f93eb929d873f56f852c53fa9f0dfc290c6 (patch)
tree06d7bab74438525a186eec6837d7829c5a3562a1
parent885cde0193d3077ef645f8852f248df4196511ba (diff)
downloadgcc-34536f93eb929d873f56f852c53fa9f0dfc290c6.zip
gcc-34536f93eb929d873f56f852c53fa9f0dfc290c6.tar.gz
gcc-34536f93eb929d873f56f852c53fa9f0dfc290c6.tar.bz2
(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
-rw-r--r--gcc/caller-save.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index 4c92159..f77eda9 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);
}
}