Mail Archives: pgcc/1998/03/13/11:44:01
On Thu, 12 Mar 1998, Marc Lehmann wrote:
>> There seems to be annother way, but involes the unducumented functions
>> __getfpucw and __setfpucw.
Undocumented???? Those functions has nothing to do with the _hardware_ ->
they are some OS/GCC thingies I don't know about -> GCC/OS is undocumented
-> GCC/OS is broken (not really... with GNU software they're documented in
source code, at least)
These functions probably use FPU instructions fstenv/fldenv, which are well
documented in Intel Pentium manuals as well as internals of the FPU.
>- not all operations are affected
_If_ the IEEE requires transcendental functions to have a low precision,
true. Does anyone _know_ what IEEE says? It's difficult for me to believe
that if IEEE would actually require it, Intel wouldn't honor them _even if_
they honor them with add/sub/div/mul etc...
>- the compiler cannot know when to set it, i.e. the same fundamental problem
> than with mmx, the compiler had to set the cw on almost every procedure
> entry etc...
Yep, the user must tell it.
>x86 fpu = hopelessly broken. by design.
Except for maybe transcendental instructions, it is not. Just set low
precision at bootup and don't change it later -> you'll have IEEE
compliance without anything (else) to do. Nothing to worry about... you'll
get the poor IEEE precision then always.
--
| Tuukka Toivonen <tuukkat AT ee DOT oulu DOT fi> [PGP public key
| Homepage: http://www.ee.oulu.fi/~tuukkat/ available]
| Try also finger -l tuukkat AT ee DOT oulu DOT fi
| Studying information engineering at the University of Oulu
+-----------------------------------------------------------
- Raw text -