Remove two obsoleted comments, add a note about 32bit compatibility.

MFC after:	1 month
This commit is contained in:
Konstantin Belousov 2010-06-15 18:16:04 +00:00
parent d8e85077eb
commit 07c809237a
2 changed files with 6 additions and 9 deletions

View File

@ -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);

View File

@ -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);