summaryrefslogtreecommitdiffstats
path: root/sys/amd64/ia32/ia32_signal.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-11-26 14:50:42 +0000
committerkib <kib@FreeBSD.org>2010-11-26 14:50:42 +0000
commit60c89c994a97c0fb5628378c9b8b98b4b6f96d32 (patch)
treeb2b70b68cc97d1e8a719368ec7e8475bd9afc7c0 /sys/amd64/ia32/ia32_signal.c
parentb2984c404f1844039344b6aa018d21ed4ee9d388 (diff)
downloadFreeBSD-src-60c89c994a97c0fb5628378c9b8b98b4b6f96d32.zip
FreeBSD-src-60c89c994a97c0fb5628378c9b8b98b4b6f96d32.tar.gz
Remove npxgetregs(), npxsetregs(), fpugetregs() and fpusetregs()
functions, they are unused. Remove 'user' from npxgetuserregs() etc. names. For {npx,fpu}{get,set}regs(), always use pcb->pcb_user_save for FPU context storage. This eliminates the need for ugly copying with overwrite of the newly added and reserved fields in ucontext on i386 to satisfy alignment requirements for fpusave() and fpurstor(). pc98 version was copied from i386. Suggested and reviewed by: bde Tested by: pho (i386 and amd64) MFC after: 1 week
Diffstat (limited to 'sys/amd64/ia32/ia32_signal.c')
-rw-r--r--sys/amd64/ia32/ia32_signal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c
index d85a3bb..aefe9f0 100644
--- a/sys/amd64/ia32/ia32_signal.c
+++ b/sys/amd64/ia32/ia32_signal.c
@@ -99,8 +99,9 @@ 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 = fpugetuserregs(td,
- (struct savefpu *)&mcp->mc_fpstate);
+ mcp->mc_ownedfp = fpugetregs(td);
+ bcopy(&td->td_pcb->pcb_user_save, &mcp->mc_fpstate,
+ sizeof(mcp->mc_fpstate));
mcp->mc_fpformat = fpuformat();
}
@@ -117,7 +118,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) {
- fpusetuserregs(td, (struct savefpu *)&mcp->mc_fpstate);
+ fpusetregs(td, (struct savefpu *)&mcp->mc_fpstate);
} else
return (EINVAL);
return (0);
OpenPOWER on IntegriCloud