This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: FENV_ACCESS questions in C and Fortran (fwd)
- To: gcc at gcc dot gnu dot org
- Subject: Re: FENV_ACCESS questions in C and Fortran (fwd)
- From: Stephen L Moshier <moshier at mediaone dot net>
- Date: Fri, 19 Nov 1999 11:35:47 -0500 (EST)
- Reply-To: moshier at mediaone dot net
---------- Forwarded message ----------
Date: Tue, 16 Nov 1999 22:38:49 +1100 (EST)
From: billm@melbpc.org.au
To: moshier@mediaone.net
Subject: Re: FENV_ACCESS questions in C and Fortran
Stephen Moshier wrote:
> > The behaviour of a FP exception is very well specified.
> ... if the exception traps are masked off.
>
> > This specification does not require support for trap handlers that
> > maintain information about the order or count of floating-point
> > exceptions.
> The user needs to have a better set of choices than this.
> I'm going to introduce and advocate an -fslow-math switch to cope with
> such items that seem to need an alternative behavior.
>
> Perhaps, if Metzenthen is still interested, this would be a time for
> him to remind us about the x86 fwait instruction.
Summary: if you want to handle FPU exceptions via interrupts then you need
in general to add fwait instructions to the FPU code.
It's late at night now and I don't have time to dig out the stuff which
I have written before on this topic, and I'm going away for a conference
tomorrow. If anyone is interested then I can dig it out when I get home
on the weekend.
You can find some of the concepts discussed on my floating point web
pages at
http://www.suburbia.net/~billm/
and
http://www.linuxsupportline.com/~billm/
I have a program called add-fwait which can be used with gcc to add
the necessary fwait instructions. It is part of my wmexcp package
which can be found on my web pages.
Cheers,
Bill
ps: I'm not subscribed to the gcc list but am cc'ing this message there
because it replies to a message which appears to be part of a thread
there.