summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2001-10-15 20:18:06 +0000
committertegge <tegge@FreeBSD.org>2001-10-15 20:18:06 +0000
commit37d284b4b61a72a0dac0d6b56ba0eb940a2da05c (patch)
treebebfc4966a54ebf0e6e9f21d2d573f5b1cce14a5 /sys/amd64/isa
parent415c64e7859afc01f2aba4e5f1647f62baef8d79 (diff)
downloadFreeBSD-src-37d284b4b61a72a0dac0d6b56ba0eb940a2da05c.zip
FreeBSD-src-37d284b4b61a72a0dac0d6b56ba0eb940a2da05c.tar.gz
Explicitly initialize the fpu when SSE is enabled since this no
longer happens as a side effect of calling npxsave. Reviewed by: peter, bde
Diffstat (limited to 'sys/amd64/isa')
-rw-r--r--sys/amd64/isa/npx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c
index 7a7aeb0..87bfe16 100644
--- a/sys/amd64/isa/npx.c
+++ b/sys/amd64/isa/npx.c
@@ -575,6 +575,11 @@ npxinit(control)
savecrit = critical_enter();
npxsave(&dummy);
stop_emulating();
+#ifdef CPU_ENABLE_SSE
+ /* XXX npxsave() doesn't actually initialize the fpu in the SSE case. */
+ if (cpu_fxsr)
+ fninit();
+#endif
fldcw(&control);
if (PCPU_GET(curpcb) != NULL)
fpusave(&PCPU_GET(curpcb)->pcb_save);
OpenPOWER on IntegriCloud