This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
64-bit long doubles on i386?
- From: "Paul N. Hilfinger" <hilfingr at otisco dot mckusick dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 10 Apr 2002 04:00:21 -0700
- Subject: 64-bit long doubles on i386?
- Reply-to: Hilfinger at otisco dot mckusick dot com
What would need to be done to modify GCC so that it uses only <=64-bit
floating-point formats (so that long double and double have
essentially the same semantics, the extended precision is not used for
intermediate results)? I've tried the obvious modifications to i386.h and
float-i386.h: setting
#define LONG_DOUBLE_TYPE_SIZE 64
#define MAX_LONG_DOUBLE_TYPE_SIZE 64
#define INTEL_EXTENDED_IEEE_FORMAT 0
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
#define INTEL_EXTENDED_IEEE_FORMAT 0
in i386.h and setting float-i386.h to take the LDBL constants from the
corresponding DBL constants. This, however, causes the bootstrap to
segfault compiling __fixunsdfSI in libgcc2.c. I was able to prevent the
segfault by kludging expand_float in optabs.c so that it doesn't try to
use XF and TF modes (which are still there, just not used for long double).
This, however, introduces test-suite regressions (unsurprisingly in
gcc.c-torture/execute/conversion.c)
Why am I interested? Well, although I've been experimenting with this on
Linux, the eventual "client" is Interix, where there is sometimes a "legacy"
problem of compatibility with (ugh) VC.
If anyone has suggestions, I'd appreciate hearing from you.
Paul Hilfinger
ACT Inc.