Fix #355: Make FP trap handler work better on Solaris/x86
Add a new sigfpe-handler for Solaris/x86 since it appears that the
existing one doesn't work for this OS. This new handler uses the
code
argument to determine that FP signal that occurred. The x87
and sse2 modes are handled separately too so that we don't spurious
set the sticky bits for x87 because they were set for sse2.
Also modify with-float-traps
to handle the x87 and sse2 modes
separately. The merged value from floating-point-modes
causes
problems when restoring the mode. If the original mode had, say, an
overflow from sse2, then restoring the modes would set the overflow
bit for both sse2 and x87. That causes problems in the sigfpe
handler.
Edited by Raymond Toy