Skip to content
Snippets Groups Projects
Commit 5385aa82 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 ffd50090
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.22 2000/04/12 17:31:19 pw Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.23 2000/10/21 12:42:46 dtc Exp $ */
/* Interrupt handing magic. */ /* Interrupt handing magic. */
...@@ -271,7 +271,8 @@ interrupt_handle_now(HANDLER_ARGS) ...@@ -271,7 +271,8 @@ interrupt_handle_now(HANDLER_ARGS)
* Restore the FPU control word, setting the rounding mode to nearest. * Restore the FPU control word, setting the rounding mode to nearest.
*/ */
setfpucw(contextstruct.fpstate->cw & ~0xc00); if (contextstruct.fpstate)
setfpucw(contextstruct.fpstate->cw & ~0xc00);
#endif #endif
handler = interrupt_handlers[signal]; handler = interrupt_handlers[signal];
......
/* x86-arch.c -*- Mode: C; comment-column: 40 -*- /* x86-arch.c -*- Mode: C; comment-column: 40 -*-
* *
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-arch.c,v 1.12 2000/09/05 08:51:52 dtc Exp $ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-arch.c,v 1.13 2000/10/21 12:42:46 dtc Exp $
* *
*/ */
...@@ -215,7 +215,8 @@ void sigtrap_handler(HANDLER_ARGS) ...@@ -215,7 +215,8 @@ void sigtrap_handler(HANDLER_ARGS)
* Restore the FPU control word, setting the rounding mode to nearest. * Restore the FPU control word, setting the rounding mode to nearest.
*/ */
setfpucw(contextstruct.fpstate->cw & ~0xc00); if (contextstruct.fpstate)
setfpucw(contextstruct.fpstate->cw & ~0xc00);
#endif #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