public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* 64-bit long doubles on i386?
@ 2002-04-10  5:23 Paul N. Hilfinger
  2002-04-10  6:45 ` Tim Prince
  0 siblings, 1 reply; 4+ messages in thread
From: Paul N. Hilfinger @ 2002-04-10  5:23 UTC (permalink / raw)
  To: gcc


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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 64-bit long doubles on i386?
  2002-04-10  5:23 64-bit long doubles on i386? Paul N. Hilfinger
@ 2002-04-10  6:45 ` Tim Prince
  2002-04-11  0:24   ` Paul N. Hilfinger
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Prince @ 2002-04-10  6:45 UTC (permalink / raw)
  To: Hilfinger, Paul N. Hilfinger, gcc

On Wednesday 10 April 2002 04:00, Paul N. Hilfinger wrote:
> 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
>
..............
> 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.
>
............
Why don't you simply set 53-bit precision mode at run time, as currentVC 
does, if you want similar operation?
-- 
Tim Prince

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 64-bit long doubles on i386?
  2002-04-10  6:45 ` Tim Prince
@ 2002-04-11  0:24   ` Paul N. Hilfinger
  0 siblings, 0 replies; 4+ messages in thread
From: Paul N. Hilfinger @ 2002-04-11  0:24 UTC (permalink / raw)
  To: tprince; +Cc: gcc


>Why don't you simply set 53-bit precision mode at run time, as currentVC 
>does, if you want similar operation?

That's a reasonable suggestion, although it still leaves the possible issue of
data formats, which would be of interest when mixing legacy libraries with
compiled code.   Perhaps, though, as you say, it will suffice for the 
actual needs in this case.  

Paul 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 64-bit long doubles on i386?
@ 2002-04-11  7:05 Stephen L Moshier
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen L Moshier @ 2002-04-11  7:05 UTC (permalink / raw)
  To: Paul N. Hilfinger; +Cc: gcc


> 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)


I think a better way to ensure the compiler generates no XFmode code
is to turn off all the XFmode patterns in the md file.

i386-osfrose and i386-isc have 64-bit long doubles.  This configuration
has been broken and fixed (or papered over) repeatedly in the past.
I guess no one cares about these targets any more.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-11 13:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-10  5:23 64-bit long doubles on i386? Paul N. Hilfinger
2002-04-10  6:45 ` Tim Prince
2002-04-11  0:24   ` Paul N. Hilfinger
2002-04-11  7:05 Stephen L Moshier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).