[PATCH] Fix target/27947: double to long long and back to double stores to the stack

Andrew Pinski pinskia@gmail.com
Tue Mar 11 21:27:00 GMT 2008


Hi,
  The problem here is that the local alloc tries to put the double
value in a non fp register when it is only used by instructions which
take a fpr.  This fixes the problem by discouraging fprs and
encouraging but not allowing gprs (!f#r) for both floatdidf2 and
fix_truncdfdi2.  This allows local alloc to do the correct thing when
the psedu is only used in these two instructions.

OK?  Bootstrapped and tested on powerpc64-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

* config/rs6000/rs6000.md (floatdidf2): Discouraging fprs and
encouraging but not allowing gprs for input;
change the input constraint to !f#r.
(fix_truncdfdi2): Discouraging fprs and encouraging but not allowing
gprs for output;
change the output constraint to !f#r.

* gcc.target/powerpc/ppc64-double-1.c: New testcase.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fixfp.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080311/776eb438/attachment.txt>


More information about the Gcc-patches mailing list