aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/i386/isa/npx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index 7b7f3a5c670d..129a853f20ed 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -952,9 +952,14 @@ npx_fork_thread(struct thread *td, struct thread *newtd)
u_int32_t mxcsr;
u_int32_t cw;
+ if (!(td->td_pcb->pcb_flags & PCB_NPXINITDONE)) {
+ newtd->td_pcb->pcb_flags &= ~PCB_NPXINITDONE;
+ return;
+ }
+
state = &newtd->td_pcb->pcb_save;
/* get control word */
- if (npxgetregs(td, &newtd->td_pcb->pcb_save))
+ if (npxgetregs(td, state))
return;
if (cpu_fxsr) {
mxcsr = state->sv_xmm.sv_env.en_mxcsr;