[Ecls-list] Accurately detecting FP exceptions

Juan Jose Garcia Ripoll lisp at arrakis.es
Wed Oct 26 02:23:09 UTC 2005


On Tue, 2005-10-25 at 16:39 +0200, Goffioul Michael wrote:
> Aaah, OK, so the problem is something else. As stated in the MSDN documentation,
> the exception is actually thrown on the next FP unit access, it is not thrown
> immediately.

I have rewritten the floating-point number boxing routines
(make_shortfloat and make_longfloat) so that on the x86 (Intel-32 bit)
platforms additional FWAIT instructions are inserted. Since these
routines are called after almost every floating point operation in the
standard library, the exceptions will be detected and signaled at the
right point.

A different issue are floating point unboxed operations, like a call to
sin() which is inlined in the C code. Here exceptions might propagate to
the wrong place.

The new code is available on CVS. Please test with MSVC.

Regards,

Juanjo





More information about the ecl-devel mailing list