summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>2001-01-12 13:42:53 +0000
committerkato <kato@FreeBSD.org>2001-01-12 13:42:53 +0000
commit3657c441c5146ab2968970fff33d2d8a4ac336d1 (patch)
tree31a4f082f25d3a60014284b596032f512ee61aff /sys
parent0d056e1e4d9ec269225eeb2f773bf3ae48da80ce (diff)
downloadFreeBSD-src-3657c441c5146ab2968970fff33d2d8a4ac336d1.zip
FreeBSD-src-3657c441c5146ab2968970fff33d2d8a4ac336d1.tar.gz
Merged from sys/i386/isa/npx.c revision 1.87.
Diffstat (limited to 'sys')
-rw-r--r--sys/pc98/pc98/npx.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/pc98/pc98/npx.c b/sys/pc98/pc98/npx.c
index 8af11cf..6dbb355 100644
--- a/sys/pc98/pc98/npx.c
+++ b/sys/pc98/pc98/npx.c
@@ -543,8 +543,8 @@ npxinit(control)
npxsave(&dummy);
stop_emulating();
fldcw(&control);
- if (curpcb != NULL)
- fnsave(&curpcb->pcb_savefpu);
+ if (PCPU_GET(curpcb) != NULL)
+ fnsave(&PCPU_GET(curpcb)->pcb_savefpu);
start_emulating();
}
@@ -556,14 +556,14 @@ npxexit(p)
struct proc *p;
{
- if (p == npxproc)
- npxsave(&curpcb->pcb_savefpu);
+ if (p == PCPU_GET(npxproc))
+ npxsave(&PCPU_GET(curpcb)->pcb_savefpu);
#ifdef NPX_DEBUG
if (npx_exists) {
u_int masked_exceptions;
- masked_exceptions = curpcb->pcb_savefpu.sv_env.en_cw
- & curpcb->pcb_savefpu.sv_env.en_sw & 0x7f;
+ masked_exceptions = PCPU_GET(curpcb)->pcb_savefpu.sv_env.en_cw
+ &PCPU_GET(curpcb)->pcb_savefpu.sv_env.en_sw & 0x7f;
/*
* Log exceptions that would have trapped with the old
* control word (overflow, divide by 0, and invalid operand).
@@ -772,14 +772,14 @@ npx_intr(dummy)
u_short control;
struct intrframe *frame;
- if (npxproc == NULL || !npx_exists) {
+ if (PCPU_GET(npxproc) == NULL || !npx_exists) {
printf("npxintr: npxproc = %p, curproc = %p, npx_exists = %d\n",
- npxproc, curproc, npx_exists);
+ PCPU_GET(npxproc), curproc, npx_exists);
panic("npxintr from nowhere");
}
- if (npxproc != curproc) {
+ if (PCPU_GET(npxproc) != curproc) {
printf("npxintr: npxproc = %p, curproc = %p, npx_exists = %d\n",
- npxproc, curproc, npx_exists);
+ PCPU_GET(npxproc), curproc, npx_exists);
panic("npxintr from non-current process");
}
@@ -788,7 +788,7 @@ npx_intr(dummy)
#else
outb(0xf0, 0);
#endif
- fnstsw(&curpcb->pcb_savefpu.sv_ex_sw);
+ fnstsw(&PCPU_GET(curpcb)->pcb_savefpu.sv_ex_sw);
fnstcw(&control);
fnclex();
@@ -814,8 +814,8 @@ npx_intr(dummy)
* this exception.
*/
code =
- fpetable[(curpcb->pcb_savefpu.sv_ex_sw & ~control & 0x3f) |
- (curpcb->pcb_savefpu.sv_ex_sw & 0x40)];
+ fpetable[(PCPU_GET(curpcb)->pcb_savefpu.sv_ex_sw & ~control & 0x3f) |
+ (PCPU_GET(curpcb)->pcb_savefpu.sv_ex_sw & 0x40)];
trapsignal(curproc, SIGFPE, code);
} else {
/*
@@ -848,9 +848,9 @@ npxdna()
{
if (!npx_exists)
return (0);
- if (npxproc != NULL) {
+ if (PCPU_GET(npxproc) != NULL) {
printf("npxdna: npxproc = %p, curproc = %p\n",
- npxproc, curproc);
+ PCPU_GET(npxproc), curproc);
panic("npxdna");
}
stop_emulating();
@@ -858,7 +858,7 @@ npxdna()
* Record new context early in case frstor causes an IRQ13.
*/
PCPU_SET(npxproc, CURPROC);
- curpcb->pcb_savefpu.sv_ex_sw = 0;
+ PCPU_GET(curpcb)->pcb_savefpu.sv_ex_sw = 0;
/*
* The following frstor may cause an IRQ13 when the state being
* restored has a pending error. The error will appear to have been
@@ -871,7 +871,7 @@ npxdna()
* fnsave are broken, so our treatment breaks fnclex if it is the
* first FPU instruction after a context switch.
*/
- frstor(&curpcb->pcb_savefpu);
+ frstor(&PCPU_GET(curpcb)->pcb_savefpu);
return (1);
}
OpenPOWER on IntegriCloud