summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-06-23 12:17:13 +0000
committerkib <kib@FreeBSD.org>2010-06-23 12:17:13 +0000
commit8177c022b541dfd7ea50a10fd33d22a04a4ce48d (patch)
tree6bc3fddcdeece5835325f8c43230cbe8de496e0f /sys/i386
parentddd061d954434ea8b04da914c0e1b724d6e8b8c1 (diff)
downloadFreeBSD-src-8177c022b541dfd7ea50a10fd33d22a04a4ce48d.zip
FreeBSD-src-8177c022b541dfd7ea50a10fd33d22a04a4ce48d.tar.gz
Fix bugs on pc98, use npxgetuserregs() instead of npxgetregs() for
get_fpcontext(), and npxsetuserregs() for set_fpcontext). Also, note that usercontext is not initialized anymore in fpstate_drop(). Systematically replace references to npxgetregs() and npxsetregs() by npxgetuserregs() and npxsetuserregs() in comments. Noted by: bde
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/machdep.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 67d9c47..d2c75fb 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -3319,7 +3319,7 @@ get_fpcontext(struct thread *td, mcontext_t *mcp)
*
* XXX unpessimize most cases by only aligning when fxsave might be
* called, although this requires knowing too much about
- * npxgetregs()'s internals.
+ * npxgetuserregs()'s internals.
*/
addr = (union savefpu *)&mcp->mc_fpstate;
if (td == PCPU_GET(fpcurthread) &&
@@ -3372,10 +3372,6 @@ set_fpcontext(struct thread *td, const mcontext_t *mcp)
if (cpu_fxsr)
addr->sv_xmm.sv_env.en_mxcsr &= cpu_mxcsr_mask;
#endif
- /*
- * XXX we violate the dubious requirement that npxsetregs()
- * be called with interrupts disabled.
- */
npxsetuserregs(td, addr);
#endif
/*
@@ -3400,12 +3396,12 @@ fpstate_drop(struct thread *td)
#endif
/*
* XXX force a full drop of the npx. The above only drops it if we
- * owned it. npxgetregs() has the same bug in the !cpu_fxsr case.
+ * owned it. npxgetuserregs() has the same bug in the !cpu_fxsr case.
*
- * XXX I don't much like npxgetregs()'s semantics of doing a full
+ * XXX I don't much like npxgetuserregs()'s semantics of doing a full
* drop. Dropping only to the pcb matches fnsave's behaviour.
* We only need to drop to !PCB_INITDONE in sendsig(). But
- * sendsig() is the only caller of npxgetregs()... perhaps we just
+ * sendsig() is the only caller of npxgetuserregs()... perhaps we just
* have too many layers.
*/
curthread->td_pcb->pcb_flags &= ~(PCB_NPXINITDONE |
OpenPOWER on IntegriCloud