Commit befa01b9 by Jim Wilson

(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
parent feca2ed3
...@@ -5701,6 +5701,7 @@ emit_reload_insns (insn) ...@@ -5701,6 +5701,7 @@ emit_reload_insns (insn)
rtx output_address_reload_insns[MAX_RECOG_OPERANDS]; rtx output_address_reload_insns[MAX_RECOG_OPERANDS];
rtx operand_reload_insns = 0; rtx operand_reload_insns = 0;
rtx other_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 following_insn = NEXT_INSN (insn);
rtx before_insn = insn; rtx before_insn = insn;
int special; int special;
...@@ -5709,7 +5710,8 @@ emit_reload_insns (insn) ...@@ -5709,7 +5710,8 @@ emit_reload_insns (insn)
for (j = 0; j < reload_n_operands; j++) for (j = 0; j < reload_n_operands; j++)
input_reload_insns[j] = input_address_reload_insns[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 /* 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, reload registers. Do these in the order that the reloads were reported,
...@@ -6489,9 +6491,13 @@ emit_reload_insns (insn) ...@@ -6489,9 +6491,13 @@ emit_reload_insns (insn)
} }
if (reload_when_needed[j] == RELOAD_OTHER) 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 (); end_sequence ();
} }
} }
...@@ -6514,10 +6520,9 @@ emit_reload_insns (insn) ...@@ -6514,10 +6520,9 @@ emit_reload_insns (insn)
After the insn being reloaded, we write the following: After the insn being reloaded, we write the following:
For each operand, any RELOAD_FOR_OUTPUT_ADDRESS reload followed by For each operand, any RELOAD_FOR_OUTPUT_ADDRESS reload followed by
the RELOAD_FOR_OUTPUT reload for that operand. the RELOAD_FOR_OUTPUT reload, followed by any RELOAD_OTHER output
reloads for the operand. The RELOAD_OTHER output reloads are output
Any RELOAD_OTHER output reloads, output in descending order by in descending order by reload number. */
reload number. */
emit_insns_before (other_input_address_reload_insns, before_insn); emit_insns_before (other_input_address_reload_insns, before_insn);
emit_insns_before (other_input_reload_insns, before_insn); emit_insns_before (other_input_reload_insns, before_insn);
...@@ -6535,6 +6540,7 @@ emit_reload_insns (insn) ...@@ -6535,6 +6540,7 @@ emit_reload_insns (insn)
{ {
emit_insns_before (output_address_reload_insns[j], following_insn); emit_insns_before (output_address_reload_insns[j], following_insn);
emit_insns_before (output_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 /* Move death notes from INSN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment