From f1c313bff28ce705619e86324c79757b60db91bc Mon Sep 17 00:00:00 2001 From: David Xu Date: Wed, 31 May 2006 00:17:29 +0000 Subject: Clear invalid bits only if CPU supports SSE, otherwise, some fields in struct save87 will be cleared unexpectly. --- sys/i386/i386/machdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys') 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() -- cgit v1.2.3