This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Possible Enhancement - Forcing double prec. on Intel FPUs
- To: egcs at cygnus dot com
- Subject: Re: Possible Enhancement - Forcing double prec. on Intel FPUs
- From: Dave Love <d dot love at dl dot ac dot uk>
- Date: 15 Jun 1998 22:23:53 +0100
- References: <199806151149.NAA12215@NWRW10.math.tu-dresden.de>
>>>>> "Ralf" == Ralf Loesche <loesche@math.tu-dresden.de> writes:
Ralf> It was about advantages/disadvantages one has from the IEEE
Ralf> extended arithmetic that Intel x86 proc. provide and others
Ralf> don't.
See also m68k?
Ralf> The easiest way to make the Intel FPU behave as it is expected
Ralf> to, is to compile the code with -ffloat-store. That option
Ralf> ensures that ALL intermediate results are stored in their
Ralf> appropriate memory locations and thereby getting rounded
Ralf> properly.
Is the g77 manual discussion of this inadequate? AFAIR it also points
out that -ffloat-store won't always help such bad code. (This is one
of the most frequently-reported g77 non-bugs.)
Ralf> By now I fix most problems by calling __setfpucw() from libc
Ralf> manually. This, however, makes source code (Fortran) less
Ralf> portable.
The g77 manual has an example of manipulating the FPU without doing
that; the Fortran just is non-portable.
I don't remember the objections to providing `-m' switches to arrange
this sort of thing at link/startup time as a convenience (given the
system-dependant code fragments, which are straightforward for the
systems I know about).