--- //depot/vendor/freebsd/src/sys/amd64/amd64/fpu.c 2006/06/19 22:39:16 +++ //depot/user/jhb/acpipci/amd64/amd64/fpu.c 2009/01/26 21:47:49 @@ -391,6 +391,7 @@ { struct pcb *pcb; register_t s; + u_short control; if (PCPU_GET(fpcurthread) == curthread) { printf("fpudna: fpcurthread == curthread %d times\n", @@ -421,6 +422,10 @@ * explicitly load sanitized registers. */ fxrstor(&fpu_cleanstate); + if (pcb->pcb_flags & PCB_32BIT) { + control = __INITIAL_FPUCW_I386__; + fldcw(&control); + } pcb->pcb_flags |= PCB_FPUINITDONE; } else fxrstor(&pcb->pcb_save); --- //depot/vendor/freebsd/src/sys/amd64/include/fpu.h 2004/04/05 21:30:47 +++ //depot/user/jhb/acpipci/amd64/include/fpu.h 2009/01/26 21:47:49 @@ -92,6 +92,7 @@ * SSE2 based math. For FreeBSD/amd64, we go with the default settings. */ #define __INITIAL_FPUCW__ 0x037F +#define __INITIAL_FPUCW_I386__ 0x127F #define __INITIAL_MXCSR__ 0x1F80 #define __INITIAL_MXCSR_MASK__ 0xFFBF