summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2004-06-19 22:24:16 +0000
committerbde <bde@FreeBSD.org>2004-06-19 22:24:16 +0000
commitffba897cc784ba0a20aede4306e2c1dbfb1ebec6 (patch)
tree820e2561d887c10c5339b0939769f5478291b793
parent6a02104a714aaf3601ea694f7f8d4618c18c4dc3 (diff)
downloadFreeBSD-src-ffba897cc784ba0a20aede4306e2c1dbfb1ebec6.zip
FreeBSD-src-ffba897cc784ba0a20aede4306e2c1dbfb1ebec6.tar.gz
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>
-rw-r--r--sys/i386/isa/npx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index 43e019f..3d625ba 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 {
OpenPOWER on IntegriCloud