From b17ef03604f2796944bd943834b2b21439df65ce Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sat, 5 Feb 2011 15:37:10 +0000 Subject: [PATCH] Fix linking of the kernel without device npx. MFC after: 2 weeks --- sys/i386/i386/machdep.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 3768bcd01521..e878b7a7f52c 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -3229,7 +3229,11 @@ fill_fpregs(struct thread *td, struct fpreg *fpregs) KASSERT(td == curthread || TD_IS_SUSPENDED(td), ("not suspended thread %p", td)); +#ifdef DEV_NPX npxgetregs(td); +#else + bzero(fpregs, sizeof(*fpregs)); +#endif #ifdef CPU_ENABLE_SSE if (cpu_fxsr) fill_fpregs_xmm(&td->td_pcb->pcb_user_save.sv_xmm, @@ -3253,7 +3257,9 @@ set_fpregs(struct thread *td, struct fpreg *fpregs) #endif /* CPU_ENABLE_SSE */ bcopy(fpregs, &td->td_pcb->pcb_user_save.sv_87, sizeof(*fpregs)); +#ifdef DEV_NPX npxuserinited(td); +#endif return (0); }