Remove two obsoleted comments, add a note about 32bit compatibility.
MFC after: 1 month
This commit is contained in:
parent
d8e85077eb
commit
07c809237a
@ -2103,11 +2103,6 @@ set_fpcontext(struct thread *td, const mcontext_t *mcp)
|
|||||||
fpstate_drop(td);
|
fpstate_drop(td);
|
||||||
else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU ||
|
else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU ||
|
||||||
mcp->mc_ownedfp == _MC_FPOWNED_PCB) {
|
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 = (struct savefpu *)&mcp->mc_fpstate;
|
||||||
fpstate->sv_env.en_mxcsr &= cpu_mxcsr_mask;
|
fpstate->sv_env.en_mxcsr &= cpu_mxcsr_mask;
|
||||||
fpusetuserregs(td, fpstate);
|
fpusetuserregs(td, fpstate);
|
||||||
|
@ -92,6 +92,12 @@ static void
|
|||||||
ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp)
|
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_ownedfp = fpugetregs(td, (struct savefpu *)&mcp->mc_fpstate);
|
||||||
mcp->mc_fpformat = fpuformat();
|
mcp->mc_fpformat = fpuformat();
|
||||||
}
|
}
|
||||||
@ -109,10 +115,6 @@ ia32_set_fpcontext(struct thread *td, const struct ia32_mcontext *mcp)
|
|||||||
fpstate_drop(td);
|
fpstate_drop(td);
|
||||||
else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU ||
|
else if (mcp->mc_ownedfp == _MC_FPOWNED_FPU ||
|
||||||
mcp->mc_ownedfp == _MC_FPOWNED_PCB) {
|
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);
|
fpusetregs(td, (struct savefpu *)&mcp->mc_fpstate);
|
||||||
} else
|
} else
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user