Skip to content
Snippets Groups Projects
Commit d7850f57 authored by Raymond Toy's avatar Raymond Toy
Browse files

Restore the FPU state before exiting.

Put an unwind-protect around the error calls.  The cleanup form
restores the floating-point modes from the sigcontext so that the mode
is restored.  This is needed, I think, because we throw so that the
signal handler doesn't return so the sigcontext isn't restored.  If we
don't restore the fpu state, it's set to the default processor state.
We want the default state when calling error.

In this way, things like (* 1d300 1d300) signals an overflow, and when
we throw to top-level, the floating-point modes are restored to their
original values they had before.
parent d9763e90
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment