summaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1997-06-12 09:45:32 -0600
committerJeff Law <law@gcc.gnu.org>1997-06-12 09:45:32 -0600
commitf5546425e91646b6997ed7ceb397f84db9b26271 (patch)
tree9f21656683ed2ccb00b9dc8478625b545fafe30e /gcc/reorg.c
parente5ffb50c0db1c7bccb63c7af869dc2bae3686368 (diff)
downloadgcc-f5546425e91646b6997ed7ceb397f84db9b26271.tar.gz
reorg.c (emit_delay_sequence): Call set_new_first_and_last_insn after the new sequence insn has been spliced...
* reorg.c (emit_delay_sequence): Call set_new_first_and_last_insn after the new sequence insn has been spliced into the insn chain. From-SVN: r14229
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 3a5a7e94460..5f24cfc200c 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -894,15 +894,22 @@ emit_delay_sequence (insn, list, length, avail)
NEXT_INSN (seq_insn) = NEXT_INSN (insn);
PREV_INSN (seq_insn) = PREV_INSN (insn);
+ if (insn != last)
+ PREV_INSN (NEXT_INSN (seq_insn)) = seq_insn;
+
+ if (insn != first)
+ NEXT_INSN (PREV_INSN (seq_insn)) = seq_insn;
+
+ /* Note the calls to set_new_first_and_last_insn must occur after
+ SEQ_INSN has been completely spliced into the insn stream.
+
+ Otherwise CUR_INSN_UID will get set to an incorrect value because
+ set_new_first_and_last_insn will not find SEQ_INSN in the chain. */
if (insn == last)
set_new_first_and_last_insn (first, seq_insn);
- else
- PREV_INSN (NEXT_INSN (seq_insn)) = seq_insn;
if (insn == first)
set_new_first_and_last_insn (seq_insn, last);
- else
- NEXT_INSN (PREV_INSN (seq_insn)) = seq_insn;
/* Build our SEQUENCE and rebuild the insn chain. */
XVECEXP (seq, 0, 0) = delay_insn;