Possible Enhancement - Forcing double prec. on Intel FPUs
Ralf Loesche
loesche@math.tu-dresden.de
Tue Jun 16 15:14:00 GMT 1998
>
> On Mon, Jun 15, 1998 at 01:49:54PM +0200, Ralf Loesche wrote:
> > The easiest way to make the Intel FPU behave as it is expected
> > to, is to compile the code with -ffloat-store.
>
> Well, no, that isn't enough to ensure it.
That's true, of course.
>
> > By now I fix most problems by calling __setfpucw() from libc manually.
> > This, however, makes source code (Fortran) less portable.
>
> See http://www.cygnus.com/ml/egcs/1998-Mar/0554.html for my solution.
>
This is exactly what I do from within Matlab.
(Well, I don't do it anymore, because Matlab 5.x does not have
this problem anymore. There are, however, still other codes out there
that suffer from extended prec.)
When you have some source code to compile that suffers from the
extended prec. it would be nice to tell the compiler to add the
appropiate call to __setfpucw() to the startup code.
Thereby removing the need to modify the sources.
This would it make easier to mess around with the FPU settings.
Real double prec. computation only can be achieved by changing
the FPU control word.
Greetings, Ralf
More information about the Gcc
mailing list