From 174486901a530129618626d18cfaff33543b15b0 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 5 Feb 1992 18:47:31 -0500 Subject: [PATCH] *** empty log message *** From-SVN: r280 --- gcc/reorg.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc/reorg.c b/gcc/reorg.c index cee2b74a43a..ebabfe78e6c 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -2327,7 +2327,13 @@ fill_simple_delay_slots (first, non_jumps_p) next_trial = prev_nonnote_insn (trial); if (eligible_for_delay (insn, slots_filled, trial)) { - delay_list = add_to_delay_list (trial, delay_list); + /* In this case, we are searching backward, so if we + find insns to put on the delay list, we want + to put them at the head, rather than the + tail, of the list. */ + + delay_list = gen_rtx (INSN_LIST, VOIDmode, + trial, delay_list); update_block (trial, trial); delete_insn (trial); if (slots_to_fill == ++slots_filled) @@ -2595,9 +2601,12 @@ fill_simple_delay_slots (first, non_jumps_p) trial = try_split (pat, trial, 1); if (ELIGIBLE_FOR_EPILOGUE_DELAY (trial, slots_filled)) { + /* Here as well we are searching backward, so put the + insns we find on the head of the list. */ + current_function_epilogue_delay_list - = add_to_delay_list (trial, - current_function_epilogue_delay_list); + = gen_rtx (INSN_LIST, VOIDmode, trial, + current_function_epilogue_delay_list); mark_referenced_resources (trial, &end_of_function_needs, 1); update_block (trial, trial); delete_insn (trial); -- 2.30.2