Index: /branches/rme-fpe/lisp-kernel/x86-exceptions.c
===================================================================
--- /branches/rme-fpe/lisp-kernel/x86-exceptions.c	(revision 13939)
+++ /branches/rme-fpe/lisp-kernel/x86-exceptions.c	(revision 13940)
@@ -955,4 +955,7 @@
 
   if (old_valence == TCR_STATE_FOREIGN) {
+#ifdef X8632
+    return false;
+#else
     /* We got a floating point exception in foreign code.  Set a flag
        in the TCR to indicate this, and resume with FP exceptions
@@ -971,5 +974,8 @@
     xpMXCSR(xp) |= MXCSR_CONTROL_MASK;
     return true;
-  } else if ((fulltag_of(cmain) == fulltag_misc) &&
+#endif
+  }
+
+  if ((fulltag_of(cmain) == fulltag_misc) &&
 	     (header_subtag(header_of(cmain)) == subtag_macptr)) {
     xcf = create_exception_callback_frame(xp, tcr);
Index: /branches/rme-fpe/lisp-kernel/x86-spentry32.s
===================================================================
--- /branches/rme-fpe/lisp-kernel/x86-spentry32.s	(revision 13939)
+++ /branches/rme-fpe/lisp-kernel/x86-spentry32.s	(revision 13940)
@@ -4184,5 +4184,7 @@
 	__(popl rcontext(tcr.save_eflags))
 	__(cld)        
+	__(stmxcsr rcontext(tcr.lisp_mxcsr))
 	__(emms)
+	__(ldmxcsr rcontext(tcr.foreign_mxcsr))
 	__(movl (%esp),%ebp)
 LocalLabelPrefix`'ffcall_setup:
@@ -4213,9 +4215,4 @@
 	__(clr %fn)
 	__(pxor %fpzero,%fpzero)
-	/* If we got a floating-point exception during the ff-call,
-	   our handler will have set a flag, preserved lisp's MXCSR,
-	   and resumed execution with fp exceptions masked. */
-	__(btrl $TCR_FLAG_BIT_FOREIGN_FPE,rcontext(tcr.flags))
-	__(jnc 1f)
 	__(cmpb $0,C(bogus_fp_exceptions))
 	__(je 0f)
@@ -4225,5 +4222,4 @@
 	__ifdef(`SSE2_MATH_LIB')
 	__(stmxcsr rcontext(tcr.ffi_exception))
-       	__(ldmxcsr rcontext(tcr.lisp_mxcsr)) /* preserved by the handler */
 	__else
 	__(fnstsw rcontext(tcr.ffi_exception))
@@ -4239,4 +4235,5 @@
         __(pop %arg_y) 	 	 
         __(pop %temp1) 
+       	__(ldmxcsr rcontext(tcr.lisp_mxcsr))
 	__(check_pending_interrupt(%temp0))
         __(pop %temp0)
