From 2f17722aa9d902a552925b66b3638b5e0d153afc Mon Sep 17 00:00:00 2001 From: James Van Artsdalen Date: Tue, 5 Oct 1993 05:52:39 +0000 Subject: [PATCH] (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 --- gcc/config/i386/i386.md | 60 ++++++++++++----------------------------- 1 file changed, 17 insertions(+), 43 deletions(-) diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 75765545f41f..5a87914ecf33 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1154,13 +1154,10 @@ 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 @@ -1211,11 +1208,6 @@ 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; } @@ -1224,13 +1216,11 @@ 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 */ @@ -1491,11 +1481,6 @@ 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; } @@ -1505,13 +1490,10 @@ 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 (); @@ -1534,11 +1516,6 @@ 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; } @@ -1548,13 +1525,10 @@ 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 (); -- 2.43.5