From 26add149273eeaedff9eb1aa212992443dbc4484 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Wed, 29 Jan 1997 13:46:28 +0000 Subject: [PATCH] Disabled logging of masked exceptions on exit. Keep the side effect of saving the state (see rev.1.17). --- sys/amd64/amd64/fpu.c | 8 ++++++-- sys/amd64/isa/npx.c | 8 ++++++-- sys/i386/isa/npx.c | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 0e73bd5a5fe..fa024ad0222 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -49,7 +49,9 @@ #include #include #include +#ifdef NPX_DEBUG #include +#endif #include #include @@ -411,20 +413,22 @@ npxexit(p) if (p == npxproc) npxsave(&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; /* - * Overflow, divde by 0, and invalid operand would have - * caused a trap in 1.1.5. + * Log exceptions that would have trapped with the old + * control word (overflow, divide by 0, and invalid operand). */ if (masked_exceptions & 0x0d) log(LOG_ERR, "pid %d (%s) exited with masked floating point exceptions 0x%02x\n", p->p_pid, p->p_comm, masked_exceptions); } +#endif } /* diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c index 0e73bd5a5fe..fa024ad0222 100644 --- a/sys/amd64/isa/npx.c +++ b/sys/amd64/isa/npx.c @@ -49,7 +49,9 @@ #include #include #include +#ifdef NPX_DEBUG #include +#endif #include #include @@ -411,20 +413,22 @@ npxexit(p) if (p == npxproc) npxsave(&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; /* - * Overflow, divde by 0, and invalid operand would have - * caused a trap in 1.1.5. + * Log exceptions that would have trapped with the old + * control word (overflow, divide by 0, and invalid operand). */ if (masked_exceptions & 0x0d) log(LOG_ERR, "pid %d (%s) exited with masked floating point exceptions 0x%02x\n", p->p_pid, p->p_comm, masked_exceptions); } +#endif } /* diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 0e73bd5a5fe..fa024ad0222 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -49,7 +49,9 @@ #include #include #include +#ifdef NPX_DEBUG #include +#endif #include #include @@ -411,20 +413,22 @@ npxexit(p) if (p == npxproc) npxsave(&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; /* - * Overflow, divde by 0, and invalid operand would have - * caused a trap in 1.1.5. + * Log exceptions that would have trapped with the old + * control word (overflow, divide by 0, and invalid operand). */ if (masked_exceptions & 0x0d) log(LOG_ERR, "pid %d (%s) exited with masked floating point exceptions 0x%02x\n", p->p_pid, p->p_comm, masked_exceptions); } +#endif } /*