Commit 2f17722a by James Van Artsdalen

(pushxf,movxf,extenddfxf2,extendsfxf2): Handle XFmode write to MEM by eading...

(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
parent 30387275
...@@ -1154,13 +1154,10 @@ ...@@ -1154,13 +1154,10 @@
xops[2] = stack_pointer_rtx; xops[2] = stack_pointer_rtx;
output_asm_insn (AS2 (sub%L2,%1,%2), xops); 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);
output_asm_insn (AS1 (fstp%T0,%0), xops); if (! find_regno_note (insn, REG_DEAD, FIRST_STACK_REG))
else output_asm_insn (AS1 (fld%T0,%0), xops);
{
output_asm_insn (AS1 (fld,%y1), operands);
output_asm_insn (AS1 (fstp%T0,%y0), xops);
}
RET; RET;
} }
else else
...@@ -1211,11 +1208,6 @@ ...@@ -1211,11 +1208,6 @@
if (STACK_TOP_P (operands[1]) && NON_STACK_REG_P (operands[0])) 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); output_to_reg (operands[0], stack_top_dies);
RET; RET;
} }
...@@ -1224,13 +1216,11 @@ ...@@ -1224,13 +1216,11 @@
if (STACK_TOP_P (operands[1])) if (STACK_TOP_P (operands[1]))
{ {
if (stack_top_dies) output_asm_insn (AS1 (fstp%z0,%y0), operands);
return AS1 (fstp%z0,%y0); if (! stack_top_dies)
else return AS1 (fld%z0,%y0);
{
output_asm_insn (AS1 (fld,%y1), operands); RET;
return AS1 (fstp%z0,%y0);
}
} }
/* Handle other kinds of reads to the 387 */ /* Handle other kinds of reads to the 387 */
...@@ -1491,11 +1481,6 @@ ...@@ -1491,11 +1481,6 @@
if (NON_STACK_REG_P (operands[0])) 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); output_to_reg (operands[0], stack_top_dies);
RET; RET;
} }
...@@ -1505,13 +1490,10 @@ ...@@ -1505,13 +1490,10 @@
if (GET_CODE (operands[0]) == MEM) if (GET_CODE (operands[0]) == MEM)
{ {
if (stack_top_dies) output_asm_insn (AS1 (fstp%z0,%y0), operands);
return AS1 (fstp%z0,%y0); if (! stack_top_dies)
else return AS1 (fld%z0,%y0);
{ RET;
output_asm_insn (AS1 (fld,%y1), operands);
return AS1 (fstp%z0,%0);
}
} }
abort (); abort ();
...@@ -1534,11 +1516,6 @@ ...@@ -1534,11 +1516,6 @@
if (NON_STACK_REG_P (operands[0])) 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); output_to_reg (operands[0], stack_top_dies);
RET; RET;
} }
...@@ -1548,13 +1525,10 @@ ...@@ -1548,13 +1525,10 @@
if (GET_CODE (operands[0]) == MEM) if (GET_CODE (operands[0]) == MEM)
{ {
if (stack_top_dies) output_asm_insn (AS1 (fstp%z0,%y0), operands);
return AS1 (fstp%z0,%y0); if (! stack_top_dies)
else return AS1 (fld%z0,%y0);
{ RET;
output_asm_insn (AS1 (fld,%y1), operands);
return AS1 (fstp%z0,%0);
}
} }
abort (); abort ();
......
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