float->double->float conversion with 19991122 snapshot (Linux/Intel)
Jan Hubicka
hubicka@atrey.karlin.mff.cuni.cz
Wed Dec 1 15:58:00 GMT 1999
>
> > float
> > fdf (float xx)
> > {
> > double x = xx;
> > return x;
> > }
>
> What an amazing mess!
> Offhand it looks i386-specific. Sparc generates a reasonable program.
Really cool code :)
But it is quite easy to fix. The expander was forcing to reg the wrong register..
Interesitng that it didn't showed up in the testsuite.
OK to install?
Thu Dec 2 00:57:00 MET 1999 Jan Hubicka <hubicka@freesoft.cz>
* i386.md (extend?f?f2): Force to register input not the output register.
Index: egcs/gcc/config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.116
diff -c -3 -p -r1.116 i386.md
*** i386.md 1999/12/01 23:48:05 1.116
--- i386.md 1999/12/01 23:55:37
***************
*** 2431,2437 ****
"
{
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
! operands[0] = force_reg (DFmode, operands[0]);
}")
(define_insn "*extendsfdf2_1"
--- 2431,2437 ----
"
{
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
! operands[1] = force_reg (SFmode, operands[1]);
}")
(define_insn "*extendsfdf2_1"
***************
*** 2472,2478 ****
"
{
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
! operands[0] = force_reg (XFmode, operands[0]);
}")
(define_insn "*extendsfxf2_1"
--- 2472,2478 ----
"
{
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
! operands[1] = force_reg (SFmode, operands[1]);
}")
(define_insn "*extendsfxf2_1"
***************
*** 2514,2520 ****
"
{
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
! operands[0] = force_reg (XFmode, operands[0]);
}")
(define_insn "*extenddfxf2_1"
--- 2514,2520 ----
"
{
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
! operands[1] = force_reg (DFmode, operands[1]);
}")
(define_insn "*extenddfxf2_1"
More information about the Gcc-bugs
mailing list