From 8e31ba530cbe76cf7541b0963ec638d546b4e334 Mon Sep 17 00:00:00 2001 From: kib Date: Tue, 15 Jun 2010 18:16:04 +0000 Subject: Remove two obsoleted comments, add a note about 32bit compatibility. MFC after: 1 month --- sys/amd64/amd64/machdep.c | 5 ----- sys/amd64/ia32/ia32_signal.c | 10 ++++++---- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'sys/amd64') diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index e38f98d..0cfdfc8 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 859b9923..cf1042c 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); -- cgit v1.1