This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What is acceptable for -ffast-math? (Was: associative law in combine)
- To: dewar at gnat dot com
- Subject: Re: What is acceptable for -ffast-math? (Was: associative law in combine)
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Wed, 1 Aug 2001 02:50:05 +0100 (BST)
- Cc: amylaar at redhat dot com, torvalds at transmeta dot com, aoliva at redhat dot com,gcc at gcc dot gnu dot org, gdr at codesourcery dot com,moshier at moshier dot ne dot mediaone dot net, tprince at computer dot org
> Actually what I had in mind was 80-bit on x86, and I don't think gcc operates
> that way by default?
It just leaves the rounding mode alone, but some library code
(glibc? newlib?) generally assumes it to be for 64 bit mantissa, i.e. 80 bit
XFmode.
OTOH, if a pseudo gets spilled, double gets a 64 bit stack slot, and float
32 bit. So we get double rounding effects and inconsistent precision.
The -ffloat-store option goes some way to mitigate these problems, at a
significant cost in performance. There was some discussion to set the
rounding mode to 64 bit, but that would break library code that assumes
XFmode values, and would still get excess precision in borderline cases:
values that are IEEE denormals in 64 bit format are not denormal in the
register format, because the exponent part of the fp registers remains
16 bit no matter what the roundig mode is set to.