Floating point divide test fails (/ 1 0.0) by terminating execution altogether due to
unhandled/unmasked floating point exception.
In module spvw.d, there appears to be code to set this up:
#if defined(UNIX_LINUX) && (defined(FAST_FLOAT) || defined(FAST_DOUBLE)) &&
!defined(HAVE_FPU_CONTROL_T) && defined(HAVE_SETFPUCW)
# Damit Division durch 0.0 ein NaN und kein SIGFPE liefert.
This appears to be a obsolete i386 call, which would understandably never be invoked on our
linux/ppc hardware. However, the other thing that is supposed to deal with fp exceptions also
doesn't work. From unixaux.[cd], we have:
global fpu_control_t __fpu_control = _FPU_IEEE;
#else /* !defined(HAVE_FPU_CONTROL_T) && !defined(HAVE_SETFPUCW) */
global unsigned short __fpu_control = _FPU_IEEE;
My understanding is that this is supposed to set up the control word on program init, however it
does not appear to be doing so. For the time being, we have added
to spvw.d, which appears to work but is a crude hack. The proper way of handling this would
probably be to use the new fenv.h support that is supposed to exist in glibc2 and is part of the
C99 spec, but I'm probably not the appropriate person to do a good job of that.