This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

64-bit long doubles on i386?



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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]