OSDN Git Service

(emit_reload_insns): For output part of RELOAD_OTHER,
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Sep 1996 23:34:28 +0000 (23:34 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Sep 1996 23:34:28 +0000 (23:34 +0000)
emit after RELOAD_FOR_OUTPUT, in reverse order of reload number,
but not separately.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12840 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/reload1.c

index cac212b..2e90fda 100644 (file)
@@ -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