www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1998/03/13/11:44:01

X-pop3-spooler: POP3MAIL 2.1.0 b 3 961213 -bs-
Delivered-To: pcg AT goof DOT com
Date: Fri, 13 Mar 1998 13:43:54 +0200 (EET)
From: Tuukka Toivonen <tuukkat AT ees2 DOT oulu DOT fi>
X-Sender: tuukkat AT stekt10
To: Marc Lehmann <pcg AT goof DOT com>
cc: Thomas Koehler <T DOT Koehler AT pfh DOT research DOT philips DOT com>,
beastium <beastium-list AT Desk DOT nl>
Subject: Re: paranoia & extra precision [was -fno-float-store in pgcc]
In-Reply-To: <19980312234128.63392@cerebro.laendle>
Message-ID: <Pine.SOL.3.96.980313133308.249A-100000@stekt10>
MIME-Version: 1.0
Sender: Marc Lehmann <pcg AT goof DOT com>
Status: RO
X-Status: A
Lines: 39

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019