diff --git a/lisp/x86-arch.c b/lisp/x86-arch.c
index 33191950f400a7679fd7459a4b1b443552cb89d5..6bc81a8b63ea34aae99044902339a15bb670a066 100644
--- a/lisp/x86-arch.c
+++ b/lisp/x86-arch.c
@@ -191,6 +191,10 @@ sigtrap_handler(HANDLER_ARGS)
   GET_CONTEXT
 #endif
 
+#ifdef __linux__
+    __setfpucw(contextstruct.fpstate->cw);
+#endif
+
   /* Don't disallow recursive breakpoint traps.  Otherwise, we can't */
   /* use debugger breakpoints anywhere in here. */
   /*fprintf(stderr,"x86sigtrap: %8x %x\n", context->sc_pc, *(char*)(context->sc_pc-1));