Explicitly initialize the fpu when SSE is enabled since this no

longer happens as a side effect of calling npxsave.

Reviewed by:	peter, bde
This commit is contained in:
Tor Egge 2001-10-15 20:18:06 +00:00
parent 268aeb1ed3
commit 4c8f0aced5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85009
3 changed files with 15 additions and 0 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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);