OSDN Git Service

(output_move_double): Use new local var
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Jun 1993 18:16:02 +0000 (18:16 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Jun 1993 18:16:02 +0000 (18:16 +0000)
highest_first to make sure addreg1 gets handled in the overlap case.
In 2-reg-overlap case, really use proper reg in new address.

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

gcc/config/i860/i860.c
gcc/config/sparc/sparc.c

index e8f20cc..da7d0ab 100644 (file)
@@ -572,6 +572,7 @@ output_move_double (operands)
   enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1;
   rtx latehalf[2];
   rtx addreg0 = 0, addreg1 = 0;
+  int highest_first = 0;
 
   /* First classify both operands.  */
 
@@ -690,18 +691,19 @@ output_move_double (operands)
          xops[0] = latehalf[0];
          xops[1] = op0;
          output_asm_insn ("adds %1,%0,%1", xops);
-         operands[1] = gen_rtx (MEM, DImode, latehalf[0]);
+         operands[1] = gen_rtx (MEM, DImode, op0);
          latehalf[1] = adj_offsettable_operand (operands[1], 4);
+         addreg1 = 0;
        }
       /* Do the late half first.  */
-      output_asm_insn (singlemove_string (latehalf), latehalf);
-      /* Then clobber.  */
-      return singlemove_string (operands);
+      highest_first = 1;
     }
 
-  /* Normal case: do the two words, low-numbered first.  */
+  /* Normal case: do the two words, low-numbered first.
+     Overlap case (highest_first set): do high-numbered word first.  */
 
-  output_asm_insn (singlemove_string (operands), operands);
+  if (! highest_first)
+    output_asm_insn (singlemove_string (operands), operands);
 
   CC_STATUS_PARTIAL_INIT;
   /* Make any unoffsettable addresses point at high-numbered word.  */
@@ -719,6 +721,9 @@ output_move_double (operands)
   if (addreg1)
     output_asm_insn ("adds -0x4,%0,%0", &addreg1);
 
+  if (highest_first)
+    output_asm_insn (singlemove_string (operands), operands);
+
   return "";
 }
 \f
index 361d332..42c5627 100644 (file)
@@ -1061,6 +1061,7 @@ output_move_double (operands)
   rtx latehalf[2];
   rtx addreg0 = 0;
   rtx addreg1 = 0;
+  int highest_first = 0;
 
   /* First classify both operands.  */
 
@@ -1166,18 +1167,19 @@ output_move_double (operands)
          xops[0] = latehalf[0];
          xops[1] = op0;
          output_asm_insn ("add %1,%0,%1", xops);
-         operands[1] = gen_rtx (MEM, DImode, latehalf[0]);
+         operands[1] = gen_rtx (MEM, DImode, op0);
          latehalf[1] = adj_offsettable_operand (operands[1], 4);
+         addreg1 = 0;
        }
       /* Do the late half first.  */
-      output_asm_insn (singlemove_string (latehalf), latehalf);
-      /* Then clobber.  */
-      return singlemove_string (operands);
+      highest_first = 1;
     }
 
-  /* Normal case: do the two words, low-numbered first.  */
+  /* Normal case: do the two words, low-numbered first.
+     Overlap case (highest_first set): do high-numbered word first.  */
 
-  output_asm_insn (singlemove_string (operands), operands);
+  if (! highest_first)
+    output_asm_insn (singlemove_string (operands), operands);
 
   /* Make any unoffsettable addresses point at high-numbered word.  */
   if (addreg0)
@@ -1194,6 +1196,9 @@ output_move_double (operands)
   if (addreg1)
     output_asm_insn ("add %0,-0x4,%0", &addreg1);
 
+  if (highest_first)
+    output_asm_insn (singlemove_string (operands), operands);
+
   return "";
 }