summaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-23 07:14:07 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-23 07:14:07 +0000
commit4816399963ee82660f4e818a049d4f16d09aa64d (patch)
treebacbc60b12bc81575fde04ef6114280a5e5fbc54 /gcc/reorg.c
parentf71e5a0252c18f3d2f112e4396e7d57d127df1d1 (diff)
downloadgcc-4816399963ee82660f4e818a049d4f16d09aa64d.tar.gz
* reorg.c (dbr_schedule): At end of this pass, add REG_BR_PRED
note holding get_jump_flags() calculation to all JUMP_INSNs. * rtl.h (enum reg_note): New note types REG_BR_PRED and REG_SAVE_AREA. * rtl.c (reg_note_name): Add new note types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15670 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 3686907ded4..28553e6583d 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -4617,5 +4617,22 @@ dbr_schedule (first, file)
}
}
}
+
+ /* For all JUMP insns, fill in branch prediction notes, so that during
+ assembler output a target can set branch prediction bits in the code.
+ We have to do this now, as up until this point the destinations of
+ JUMPS can be moved around and changed, but past right here that cannot
+ happen. */
+ for (insn = first; insn; insn = NEXT_INSN (insn))
+ {
+ int pred_flags;
+
+ if (GET_CODE (insn) != JUMP_INSN)
+ continue;
+
+ pred_flags = get_jump_flags (insn, JUMP_LABEL (insn));
+ REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_BR_PRED,
+ GEN_INT (pred_flags), REG_NOTES (insn));
+ }
}
#endif /* DELAY_SLOTS */