This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: PR29335 evaluate transcendentals at compile-time using MPFR
On Mon, 9 Oct 2006, Richard Guenther wrote:
> Does it work correctly with cross-compiling and weird host/target float
> formats?
real.c still exists to handle encoding/decoding the various target float
formats (host float formats should be, and remain, irrelevant). I don't
know about handing details such as presence/absence of infinities,
denormals etc.; MPFR won't solve the issues with handing fundamentally
non-IEEE formats (IBM long double with its discontiguous bits), but for
the transcendental functions it really should be sufficient to treat IBM
long double as a normal floating point type with 106 or 107 bits of
mantissa.
As for cross-compiling, I'm sure we can fix any problems, if necessary by
forcing the use of the generic C code in GMP rather than the host-specific
assembly. GMP doesn't like being configured with --target different from
--host; that's a matter of toplevel configure support to pass
--target=$host to GMP. The fact that the toplevel Makefile passes CFLAGS
and --build --host --target when configuring subdirectories avoids some of
the GMP autodetection problems; there might still be issues with how GMP
chooses which ABI to build for.
The biggest potential problem is that, as per FSF policies, we can't alter
the code imported from other GNU projects; any fixes must be through
changes outside the gmp and mpfr directories or else through importing new
upstream versions of GMP and MPFR.
--
Joseph S. Myers
joseph@codesourcery.com