Skip to content
Snippets Groups Projects
Commit 9f4a1f5e authored by dtc's avatar dtc
Browse files

Take more care when restoring the FPU control word for linux, as there

may not be a fpstate in some rare cases.
parent 0715274e
No related branches found
No related tags found
No related merge requests found
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.23 2000/10/21 12:42:46 dtc Exp $ */
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.24 2000/10/21 13:01:23 dtc Exp $ */
/* Interrupt handing magic. */
......@@ -360,14 +360,6 @@ maybe_now_maybe_later(HANDLER_ARGS)
SAVE_CONTEXT(); /**/
#if defined(__linux__) && defined(i386)
/*
* Restore the FPU control word, setting the rounding mode to nearest.
*/
setfpucw(contextstruct.fpstate->cw & ~0xc00);
#endif
if (SymbolValue(INTERRUPTS_ENABLED) == NIL) {
pending_signal = signal;
pending_code = DEREFCODE(code);
......@@ -420,12 +412,22 @@ maybe_now_maybe_later(HANDLER_ARGS)
#endif /* POSIX_SIGS */
arch_set_pseudo_atomic_interrupted(context);
} else
} else {
#if defined(__linux__) && defined(i386)
/*
* Restore the FPU control word, setting the rounding mode to nearest.
*/
if (contextstruct.fpstate)
setfpucw(contextstruct.fpstate->cw & ~0xc00);
#endif
#if ( defined( __linux__ ) && defined( i386 ) )
interrupt_handle_now(signal, contextstruct);
#else
interrupt_handle_now(signal, code, context);
#endif
}
}
/****************************************************************\
......
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