aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-08-31 08:31:20 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-08-31 08:31:20 -0400
commitd7e0324f1a1134da2491d5d6af57c47bca397753 (patch)
treef3d9857279dd7671baefac44878da59d009ca3e5
parent74347d76f06ff17e4459c3bf73223f2ba630db5b (diff)
downloadgcc-d7e0324f1a1134da2491d5d6af57c47bca397753.zip
gcc-d7e0324f1a1134da2491d5d6af57c47bca397753.tar.gz
gcc-d7e0324f1a1134da2491d5d6af57c47bca397753.tar.bz2
(emit_reload_insn): Emit RELOAD_OTHER output reloads last.
From-SVN: r10295
-rw-r--r--gcc/reload1.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index a03a603..9f437b6 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -5650,6 +5650,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 = 0;
rtx following_insn = NEXT_INSN (insn);
rtx before_insn = insn;
int special;
@@ -6288,7 +6289,10 @@ emit_reload_insns (insn)
if (GET_CODE (insn) == JUMP_INSN)
abort ();
- push_to_sequence (output_reload_insns[reload_opnum[j]]);
+ if (reload_when_needed[j] == RELOAD_OTHER)
+ push_to_sequence (other_output_reload_insns);
+ else
+ push_to_sequence (output_reload_insns[reload_opnum[j]]);
/* Determine the mode to reload in.
See comments above (for input reloading). */
@@ -6432,7 +6436,11 @@ emit_reload_insns (insn)
new_spill_reg_store[reload_spill_index[j]] = p;
}
- output_reload_insns[reload_opnum[j]] = get_insns ();
+ if (reload_when_needed[j] == RELOAD_OTHER)
+ other_output_reload_insns = get_insns ();
+ else
+ output_reload_insns[reload_opnum[j]] = get_insns ();
+
end_sequence ();
}
}
@@ -6455,7 +6463,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. */
+ the RELOAD_FOR_OUTPUT reload for that operand.
+
+ Any RELOAD_OTHER output reloads. */
emit_insns_before (other_input_address_reload_insns, before_insn);
emit_insns_before (other_input_reload_insns, before_insn);
@@ -6475,6 +6485,8 @@ emit_reload_insns (insn)
emit_insns_before (output_reload_insns[j], following_insn);
}
+ emit_insns_before (other_output_reload_insns, following_insn);
+
/* Move death notes from INSN
to output-operand-address and output reload insns. */
#ifdef PRESERVE_DEATH_INFO_REGNO_P