summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-01-29 13:46:28 +0000
committerbde <bde@FreeBSD.org>1997-01-29 13:46:28 +0000
commita40655e5dd90ad1dc18034c6026793f1f8aa2ae9 (patch)
treed423519c04b924127915d709531f303c4ae94eff /sys
parent05e286fe5ee8cc402ee034198b63c6eb34b64807 (diff)
downloadFreeBSD-src-a40655e5dd90ad1dc18034c6026793f1f8aa2ae9.zip
FreeBSD-src-a40655e5dd90ad1dc18034c6026793f1f8aa2ae9.tar.gz
Disabled logging of masked exceptions on exit. Keep the side effect of
saving the state (see rev.1.17).
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/fpu.c8
-rw-r--r--sys/amd64/isa/npx.c8
-rw-r--r--sys/i386/isa/npx.c8
3 files changed, 18 insertions, 6 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index 0e73bd5..fa024ad 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -49,7 +49,9 @@
#include <sys/file.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
+#ifdef NPX_DEBUG
#include <sys/syslog.h>
+#endif
#include <sys/signalvar.h>
#include <machine/cpu.h>
@@ -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 0e73bd5..fa024ad 100644
--- a/sys/amd64/isa/npx.c
+++ b/sys/amd64/isa/npx.c
@@ -49,7 +49,9 @@
#include <sys/file.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
+#ifdef NPX_DEBUG
#include <sys/syslog.h>
+#endif
#include <sys/signalvar.h>
#include <machine/cpu.h>
@@ -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 0e73bd5..fa024ad 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -49,7 +49,9 @@
#include <sys/file.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
+#ifdef NPX_DEBUG
#include <sys/syslog.h>
+#endif
#include <sys/signalvar.h>
#include <machine/cpu.h>
@@ -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
}
/*
OpenPOWER on IntegriCloud