Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 May 1999 13:58:20 +0200
From:      Martin Cracauer <cracauer@cons.org>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        Brian Feldman <green@unixhelp.org>, eagle <eagle@eagle.phc.igs.net>, John-Mark Gurney <gurney_j@resnet.uoregon.edu>, Lee Cremeans <lcremeans@erols.com>, hackers@FreeBSD.ORG, multimedia@FreeBSD.ORG
Subject:   Re: G200 GLX and SIGFPU
Message-ID:  <19990513135820.A43622@cons.org>
In-Reply-To: <owner-freebsd-hackersATFreeBSD.ORG--Pine.BSF.4.05.9905081136210.18703-100000@herring.nlsystems.com>; from Doug Rabson on Sat, May 08, 1999 at 10:21:34PM %2B0200
References:  <Pine.BSF.4.10.9905080624130.9882-100000@janus.syracuse.net> <owner-freebsd-hackersATFreeBSD.ORG--Pine.BSF.4.05.9905081136210.18703-100000@herring.nlsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In <owner-freebsd-hackersATFreeBSD.ORG--Pine.BSF.4.05.9905081136210.18703-100000@herring.nlsystems.com>, Doug Rabson wrote: 

>It looks like __BETTER_BDE_NPXCW__ would mask OVF, DIV0 and INV which I
>think is a better default. Is there some reason other than inertia for not
>changing to __BETTER_BDE_NPXCW__?

The "official" reason that FreeBSD still defaults to unmasked FPEs is
that the Intel architekture doesn't allow you to handle "normal"
computation errors (over/undeflow, div by zero etc.) differently from
"real errors" in the FPU, like a FPU stack over/underflow and
completely invalid operations.

If you use __BETTER_BDE_NPXCW__, you will get rid of the FPEs in bad
computations and at the same time disable the ability to catch
"serious" FPU errors, which may be caused by bad compilers or inline
assembly (not that uncommon in scientify floating point code or X
servers).

In a word, if you are on Intel processor's, it's always better to make
your computations in a way that you test for exceptional values that
would cause FPEs prior to the computation and leave FPEs enabled.

The alternative is to install a handler for SIGFPE and let that one
decide whether the exception was harmless or not. This is possible
using the FPE trapcode patch I sent to -current a while ago. A version
for last weeks 4.0-current is available by mail. Should run on 3.x as
well.

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@bik-gmbh.de> http://www.bik-gmbh.de/~cracauer/
"Where do you want to do today?" Hard to tell running your calendar 
 program on a junk operating system, eh?


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990513135820.A43622>