From befa01b9b7778245b327dbe05fef7215473fd28d Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Tue, 24 Sep 1996 16:34:28 -0700 Subject: [PATCH] (emit_reload_insns): For output part of RELOAD_OTHER, emit after RELOAD_FOR_OUTPUT, in reverse order of reload number, but not separately. From-SVN: r12840 --- gcc/reload1.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/gcc/reload1.c b/gcc/reload1.c index cac212bba0f..2e90fdadddb 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -5701,6 +5701,7 @@ emit_reload_insns (insn) rtx output_address_reload_insns[MAX_RECOG_OPERANDS]; rtx operand_reload_insns = 0; rtx other_operand_reload_insns = 0; + rtx other_output_reload_insns[MAX_RECOG_OPERANDS]; rtx following_insn = NEXT_INSN (insn); rtx before_insn = insn; int special; @@ -5709,7 +5710,8 @@ emit_reload_insns (insn) for (j = 0; j < reload_n_operands; j++) input_reload_insns[j] = input_address_reload_insns[j] - = output_reload_insns[j] = output_address_reload_insns[j] = 0; + = output_reload_insns[j] = output_address_reload_insns[j] + = other_output_reload_insns[j] = 0; /* Now output the instructions to copy the data into and out of the reload registers. Do these in the order that the reloads were reported, @@ -6489,9 +6491,13 @@ emit_reload_insns (insn) } if (reload_when_needed[j] == RELOAD_OTHER) - emit_insns (output_reload_insns[reload_opnum[j]]); + { + emit_insns (other_output_reload_insns[reload_opnum[j]]); + other_output_reload_insns[reload_opnum[j]] = get_insns (); + } + else + output_reload_insns[reload_opnum[j]] = get_insns (); - output_reload_insns[reload_opnum[j]] = get_insns (); end_sequence (); } } @@ -6514,10 +6520,9 @@ emit_reload_insns (insn) After the insn being reloaded, we write the following: For each operand, any RELOAD_FOR_OUTPUT_ADDRESS reload followed by - the RELOAD_FOR_OUTPUT reload for that operand. - - Any RELOAD_OTHER output reloads, output in descending order by - reload number. */ + the RELOAD_FOR_OUTPUT reload, followed by any RELOAD_OTHER output + reloads for the operand. The RELOAD_OTHER output reloads are output + in descending order by reload number. */ emit_insns_before (other_input_address_reload_insns, before_insn); emit_insns_before (other_input_reload_insns, before_insn); @@ -6535,6 +6540,7 @@ emit_reload_insns (insn) { emit_insns_before (output_address_reload_insns[j], following_insn); emit_insns_before (output_reload_insns[j], following_insn); + emit_insns_before (other_output_reload_insns[j], following_insn); } /* Move death notes from INSN -- 2.30.2