The following patch extends GCC's use of the x87's instructions to
load special floating point constants, for example "fldpi". These
instructions load the long double (XFmode) precision representation
of these constants, and so can't normally be used when working with
floats or doubles.
For this reason, GCC currently will generate a "fldpi" instruction
to implement "4*atanl(1)", but won't use it to implement the double
form, i.e. "4*atan(1)", with or without -ffast-math.
The following potentially controversial patch to the i386 backend,
allows the float and double rounded forms of these constants to be
approximated with extra precision when flag_unsafe_math_optimizations
is specified. I hope this interpretation is reasonable.
The only other tweak in this patch is to use these short instructions
when optimizing for size, even on CPUs where loading the constant from
a constant pool may be faster.
The following patch has been tested on i686-pc-linux-gnu with a full
"make bootstrap", all languages except treelang, and regression tested
with a top-level "make -k check" with no new failures.
Ok for mainline?