Skip to content

Commit

Permalink
In the ia32_{get,set}_fpcontext(), use fpu{get,set}userregs instead
Browse files Browse the repository at this point in the history
of fpu{get,set}regs.

Noted by:	bde
MFC after:	1 month
  • Loading branch information
kostikbel committed Jun 17, 2010
1 parent 881839d commit 188338f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sys/amd64/ia32/ia32_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp)
* 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 = fpugetuserregs(td,
(struct savefpu *)&mcp->mc_fpstate);
mcp->mc_fpformat = fpuformat();
}

Expand All @@ -115,7 +116,7 @@ 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) {
fpusetregs(td, (struct savefpu *)&mcp->mc_fpstate);
fpusetuserregs(td, (struct savefpu *)&mcp->mc_fpstate);
} else
return (EINVAL);
return (0);
Expand Down

0 comments on commit 188338f

Please sign in to comment.