diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-05-31 00:17:29 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-05-31 00:17:29 +0000 |
commit | 42175dc9445df3edfcd9a3b8c78d12abac3c1ba5 (patch) | |
tree | 0b919e32ba8705a203e0821b880aebb400b8fd70 /sys/i386 | |
parent | 9507be8d560edd3ba6bf4884dcbfe65996010bdd (diff) | |
download | FreeBSD-src-42175dc9445df3edfcd9a3b8c78d12abac3c1ba5.zip FreeBSD-src-42175dc9445df3edfcd9a3b8c78d12abac3c1ba5.tar.gz |
Clear invalid bits only if CPU supports SSE, otherwise, some fields in
struct save87 will be cleared unexpectly.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/machdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 4c455cd..e3d7e86 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -2711,7 +2711,8 @@ set_fpcontext(struct thread *td, const mcontext_t *mcp) } #ifdef DEV_NPX #ifdef CPU_ENABLE_SSE - addr->sv_xmm.sv_env.en_mxcsr &= cpu_mxcsr_mask; + if (cpu_fxsr) + addr->sv_xmm.sv_env.en_mxcsr &= cpu_mxcsr_mask; #endif /* * XXX we violate the dubious requirement that npxsetregs() |