summaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-11-16 00:33:56 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-11-16 00:33:56 +0000
commite6812ef844ed8f05bc1564f9e4243565ca0bd38e (patch)
treeeeea59ec6818a934db499319c58434037bd8197e /gcc/reorg.c
parent6a5127bb8151139f1df03d9cb5feb3ea7a3bbb4a (diff)
downloadgcc-e6812ef844ed8f05bc1564f9e4243565ca0bd38e.tar.gz
(relax_delay_slots): When invert a conditional jump over a single
unconditional jump, invert the INSN_FROM_TARGET_P bit of insns in the delay slots. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8452 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index ec21a350382..cd7d6528f24 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -3972,6 +3972,17 @@ relax_delay_slots (first)
if (invert_jump (delay_insn, label))
{
+ int i;
+
+ /* Must update the INSN_FROM_TARGET_P bits now that
+ the branch is reversed, so that mark_target_live_regs
+ will handle the delay slot insn correctly. */
+ for (i = 1; i < XVECLEN (PATTERN (insn), 0); i++)
+ {
+ rtx slot = XVECEXP (PATTERN (insn), 0, i);
+ INSN_FROM_TARGET_P (slot) = ! INSN_FROM_TARGET_P (slot);
+ }
+
delete_insn (next);
next = insn;
}