diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index e38f98d0510a..0cfdfc86ead6 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -2103,11 +2103,6 @@ set_fpcontext(struct thread *td, const mcontext_t *mcp) fpstate_drop(td); else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU || mcp->mc_ownedfp == _MC_FPOWNED_PCB) { - /* - * XXX we violate the dubious requirement that fpusetregs() - * be called with interrupts disabled. - * XXX obsolete on trap-16 systems? - */ fpstate = (struct savefpu *)&mcp->mc_fpstate; fpstate->sv_env.en_mxcsr &= cpu_mxcsr_mask; fpusetuserregs(td, fpstate); diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c index 859b9923f682..cf1042c845b9 100644 --- a/sys/amd64/ia32/ia32_signal.c +++ b/sys/amd64/ia32/ia32_signal.c @@ -92,6 +92,12 @@ static void ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp) { + /* + * XXX Format of 64bit and 32bit FXSAVE areas differs. FXSAVE + * in 32bit mode saves %cs and %ds, while on 64bit it saves + * 64bit instruction and data pointers. Ignore the difference + * for now, it should be irrelevant for most applications. + */ mcp->mc_ownedfp = fpugetregs(td, (struct savefpu *)&mcp->mc_fpstate); mcp->mc_fpformat = fpuformat(); } @@ -109,10 +115,6 @@ ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp) fpstate_drop(td); else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU || mcp->mc_ownedfp == _MC_FPOWNED_PCB) { - /* - * XXX we violate the dubious requirement that fpusetregs() - * be called with interrupts disabled. - */ fpusetregs(td, (struct savefpu *)&mcp->mc_fpstate); } else return (EINVAL);