summaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-07 20:37:38 +0000
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-07 20:37:38 +0000
commit522e1febb5d3109a76bd9942d535ff1541842622 (patch)
tree80d772fff7db4e9f1e6aaa299a039f60d7ee2b78 /gcc/reorg.c
parent8f559c6e6a643c06000367ae1cc807d23c05864d (diff)
downloadgcc-522e1febb5d3109a76bd9942d535ff1541842622.tar.gz
2015-12-07 Steve Ellcey <sellcey@imgtec.com>
* reorg.c (optimize_skip): Do not put frame related instructions in annulled delay slots. (steal_delay_list_from_target): Ditto. (fill_slots_from_thread): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231382 138bc75d-0d04-0410-961f-82ee72b054a4
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 cc68d6bc540..1930a5f96cd 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -739,6 +739,7 @@ optimize_skip (rtx_jump_insn *insn, vec<rtx_insn *> *delay_list)
|| recog_memoized (trial) < 0
|| (! eligible_for_annul_false (insn, 0, trial, flags)
&& ! eligible_for_annul_true (insn, 0, trial, flags))
+ || RTX_FRAME_RELATED_P (trial)
|| can_throw_internal (trial))
return;
@@ -1126,7 +1127,13 @@ steal_delay_list_from_target (rtx_insn *insn, rtx condition, rtx_sequence *seq,
trial, flags)))
{
if (must_annul)
- used_annul = 1;
+ {
+ /* Frame related instructions cannot go into annulled delay
+ slots, it messes up the dwarf info. */
+ if (RTX_FRAME_RELATED_P (trial))
+ return;
+ used_annul = 1;
+ }
rtx_insn *temp = copy_delay_slot_insn (trial);
INSN_FROM_TARGET_P (temp) = 1;
add_to_delay_list (temp, &new_delay_list);
@@ -2464,9 +2471,9 @@ fill_slots_from_thread (rtx_jump_insn *insn, rtx condition,
if (eligible_for_delay (insn, *pslots_filled, trial, flags))
goto winner;
}
- else if (0
- || (ANNUL_IFTRUE_SLOTS && ! thread_if_true)
- || (ANNUL_IFFALSE_SLOTS && thread_if_true))
+ else if (!RTX_FRAME_RELATED_P (trial)
+ && ((ANNUL_IFTRUE_SLOTS && ! thread_if_true)
+ || (ANNUL_IFFALSE_SLOTS && thread_if_true)))
{
old_trial = trial;
trial = try_split (pat, trial, 0);