diff options
author | Bruce Evans <bde@FreeBSD.org> | 2004-06-19 22:24:16 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 2004-06-19 22:24:16 +0000 |
commit | 6ed979574f347582f45ed45d2014416f93754c6f (patch) | |
tree | 820e2561d887c10c5339b0939769f5478291b793 | |
parent | 7905213dd12486b0f1445b65a7bb9ce799e42fdb (diff) | |
download | src-6ed979574f347582f45ed45d2014416f93754c6f.tar.gz src-6ed979574f347582f45ed45d2014416f93754c6f.zip |
Clear any pending exceptions before using frstor (in the non-FXSR case)
in npxsetregs() too. npxsetregs() must overwrite the previous state, and
it is never paired with an npxgetregs() that would defuse the previous
state (since npxgetregs() would have fninit'ed the state, leaving nothing
to do).
PR: 68058 (this should complete the fix)
Tested by: Simon Barner <barner@in.tum.de>
Notes
Notes:
svn path=/head/; revision=130752
-rw-r--r-- | sys/i386/isa/npx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 43e019f5288c..3d625baef4db 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -944,6 +944,10 @@ npxsetregs(td, addr) s = intr_disable(); if (td == PCPU_GET(fpcurthread)) { +#ifdef CPU_ENABLE_SSE + if (!cpu_fxsr) +#endif + fnclex(); /* As in npxdrop(). */ fpurstor(addr); intr_restore(s); } else { |