From: Olaf Flebbe <flebbe@science-computing.de>
Subject: SIGFPE
Date: Thu, 10 Apr 1997 13:41:24 +0200 [thread overview]
Message-ID: <f07e2355530eb6b330901d478baff1ea.axp-list@archive.invalid> (raw)
Randy,
[I did the first IEEE FPU exception things on linux/x86]
Don't do a signal handler on SIGFPE, it will not work most of the time.
On Intel processorcs the Floating point unit is decoupled from the
Integer Unit. You will raise an floating point exception, (the kernel
will send you a SIGFPE if you trigger souch a thing) if you access the
floating point unit the next time *after* the exception occurs.
Incidently gcc produces code which mixes up integer and floating point
operations (for performance reasons) and therefore you will get an
Exception at unpredictable times later in your code. [ In your code it
will happen deep in the printf library code]. So don't to this, the
argument may be correctly for other cpu/compiler combinations.
The IEEE754 states that no signal should be raised on invalid
operations. They defined a set of pseudo numbers which define the
outcome of an invalid operations like 1./0. [BTW this is INF].
You are free to implement exception handlers and such things, but these
should the default behaviour.
Speaking for linux/x86:
For new libraries (Version ~>5.1) the IEEE754 style is the default.
[And the library -lieee is obsolete]
Linux/alpha should handle it correctly, not the JDK. I don't know the
alpha, but on x86 it is an issue of correctly initialising the FPU.
Olaf
--
Dr. Olaf Flebbe Phone +49 (0)7071-9457-32
science + computing gmbh FAX +49 (0)7071-9457-27
Hagellocher Weg 71
D-72070 Tuebingen Email: o.flebbe@science-computing.de
PGP fingerprint = 56 FC 74 F7 31 FE 49 13 31 12 6F E5 B9 04 1E 02
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next reply other threads:[~1997-04-10 11:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-10 11:41 Olaf Flebbe [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-08-27 14:23 SIGFPE Christopher J. Grayce
1997-04-10 18:31 SIGFPE Jim Paradis
1997-04-10 18:04 SIGFPE Randy Chapman
1997-04-10 19:07 ` SIGFPE Richard Henderson
1997-04-10 19:09 ` SIGFPE Richard Henderson
1997-04-10 16:09 SIGFPE Jim Paradis
1997-04-09 19:05 SIGFPE Jim Paradis
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox