diff options
author | David Xu <davidxu@FreeBSD.org> | 2006-05-31 00:17:29 +0000 |
---|---|---|
committer | David Xu <davidxu@FreeBSD.org> | 2006-05-31 00:17:29 +0000 |
commit | f1c313bff28ce705619e86324c79757b60db91bc (patch) | |
tree | 0b919e32ba8705a203e0821b880aebb400b8fd70 /sys | |
parent | 1dbb640331cee92839f3bc077ce33b0c00300ea2 (diff) | |
download | src-f1c313bff28ce705619e86324c79757b60db91bc.tar.gz src-f1c313bff28ce705619e86324c79757b60db91bc.zip |
Clear invalid bits only if CPU supports SSE, otherwise, some fields in
struct save87 will be cleared unexpectly.
Notes
Notes:
svn path=/head/; revision=159089
Diffstat (limited to 'sys')
-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 4c455cd16ee8..e3d7e86cae3c 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() |