]> gcc.gnu.org Git - gcc.git/commitdiff
(pushxf,movxf,extenddfxf2,extendsfxf2): Handle XFmode write to MEM by eading...
authorJames Van Artsdalen <jrv@gnu.org>
Tue, 5 Oct 1993 05:52:39 +0000 (05:52 +0000)
committerJames Van Artsdalen <jrv@gnu.org>
Tue, 5 Oct 1993 05:52:39 +0000 (05:52 +0000)
(pushxf,movxf,extenddfxf2,extendsfxf2): Handle XFmode write to MEM by
eading back value after write if source doesn't die.
(movxf,extenddfxf2,extendsfxf2): Don't emit fld before calling
output_to_reg: output_to_reg does that now.

From-SVN: r5601

gcc/config/i386/i386.md

index 75765545f41f7ee26cc9840bde7ff105773e66c8..5a87914ecf33c501cebcbfc4f0dd49cad7ffe3cb 100644 (file)
       xops[2] = stack_pointer_rtx;
 
       output_asm_insn (AS2 (sub%L2,%1,%2), xops);
-      if (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG))
-        output_asm_insn (AS1 (fstp%T0,%0), xops);
-      else
-        {
-          output_asm_insn (AS1 (fld,%y1), operands);
-          output_asm_insn (AS1 (fstp%T0,%y0), xops);
-         }
+      output_asm_insn (AS1 (fstp%T0,%0), xops);
+      if (! find_regno_note (insn, REG_DEAD, FIRST_STACK_REG))
+       output_asm_insn (AS1 (fld%T0,%0), xops);
+
       RET;
     }
   else
 
   if (STACK_TOP_P (operands[1]) && NON_STACK_REG_P (operands[0]))
     {
-      if (stack_top_dies == 0)
-       {
-         output_asm_insn (AS1 (fld,%y1), operands);
-         stack_top_dies = 1;
-       }
       output_to_reg (operands[0], stack_top_dies);
       RET;
     }
 
   if (STACK_TOP_P (operands[1]))
     {
-      if (stack_top_dies)
-       return AS1 (fstp%z0,%y0);
-      else
-       {
-        output_asm_insn (AS1 (fld,%y1), operands);
-       return AS1 (fstp%z0,%y0);
-       }
+      output_asm_insn (AS1 (fstp%z0,%y0), operands);
+      if (! stack_top_dies)
+       return AS1 (fld%z0,%y0);
+
+      RET;
     }
 
   /* Handle other kinds of reads to the 387 */
 
   if (NON_STACK_REG_P (operands[0]))
     {
-      if (stack_top_dies == 0)
-       {
-         output_asm_insn (AS1 (fld,%y1), operands);
-         stack_top_dies = 1;
-       }
       output_to_reg (operands[0], stack_top_dies);
       RET;
     }
 
   if (GET_CODE (operands[0]) == MEM)
     {
-      if (stack_top_dies)
-       return AS1 (fstp%z0,%y0);
-      else
-       {
-         output_asm_insn (AS1 (fld,%y1), operands);
-         return AS1 (fstp%z0,%0);
-       }
+      output_asm_insn (AS1 (fstp%z0,%y0), operands);
+      if (! stack_top_dies)
+       return AS1 (fld%z0,%y0);
+      RET;
     }
 
   abort ();
 
   if (NON_STACK_REG_P (operands[0]))
     {
-      if (stack_top_dies == 0)
-       {
-         output_asm_insn (AS1 (fld,%y1), operands);
-         stack_top_dies = 1;
-       }
       output_to_reg (operands[0], stack_top_dies);
       RET;
     }
 
   if (GET_CODE (operands[0]) == MEM)
     {
-      if (stack_top_dies)
-       return AS1 (fstp%z0,%y0);
-      else
-       {
-         output_asm_insn (AS1 (fld,%y1), operands);
-         return AS1 (fstp%z0,%0);
-       }
+      output_asm_insn (AS1 (fstp%z0,%y0), operands);
+      if (! stack_top_dies)
+       return AS1 (fld%z0,%y0);
+      RET;
     }
 
   abort ();
This page took 0.075686 seconds and 5 git commands to generate.