diff options
author | tegge <tegge@FreeBSD.org> | 2001-10-15 20:18:06 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 2001-10-15 20:18:06 +0000 |
commit | 37d284b4b61a72a0dac0d6b56ba0eb940a2da05c (patch) | |
tree | bebfc4966a54ebf0e6e9f21d2d573f5b1cce14a5 /sys/amd64/isa | |
parent | 415c64e7859afc01f2aba4e5f1647f62baef8d79 (diff) | |
download | FreeBSD-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.c | 5 |
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); |