summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/include/proc.h
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2002-04-28 20:55:15 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2002-04-28 20:55:15 +0000
commitac8277407eec4f1f45a73b8462b4a807928dd1f0 (patch)
treee97e090b84d170144eb0ed99eeba0d7e1ab1ed5d /sys/arch/alpha/include/proc.h
parent4433d79654bae3b6a03df679b3ace77f4b639331 (diff)
IEEE 754 floating point completion code, and implementation of the
FP_C (Floating Point Control Quadword). From ross@NetBSD. Added a way to disable it with option NO_IEEE, which appears on the ramdisks to save space. This affects only programs compiled with -mieee, and what it essentially does is enabling infinities and NaNs, instead of generating SIGFPE on division by zero, overflow, etc. ok art, deraadt
Diffstat (limited to 'sys/arch/alpha/include/proc.h')
-rw-r--r--sys/arch/alpha/include/proc.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/sys/arch/alpha/include/proc.h b/sys/arch/alpha/include/proc.h
index fd698f6f9e1..dab1d4c78c0 100644
--- a/sys/arch/alpha/include/proc.h
+++ b/sys/arch/alpha/include/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.7 2002/03/14 01:26:27 millert Exp $ */
+/* $OpenBSD: proc.h,v 1.8 2002/04/28 20:55:14 pvalchev Exp $ */
/* $NetBSD: proc.h,v 1.2 1995/03/24 15:01:36 cgd Exp $ */
/*
@@ -45,7 +45,28 @@ struct mdproc {
struct mdbpt md_sstep[2]; /* two breakpoints for sstep */
};
+/*
+ * md_flags usage
+ * --------------
+ * MDP_FPUSED
+ * A largely unused bit indicating the presence of FPU history.
+ * Cleared on exec. Set but not used by the fpu context switcher
+ * itself.
+ *
+ * MDP_FP_C
+ * The architected FP Control word. It should forever begin at bit 1,
+ * as the bits are AARM specified and this way it doesn't need to be
+ * shifted.
+ *
+ * Until C99 there was never an IEEE 754 API, making most of the
+ * standard useless. Because of overlapping AARM, OSF/1, NetBSD, and
+ * C99 API's, the use of the MDP_FP_C bits is defined variously in
+ * ieeefp.h and fpu.h.
+ */
#define MDP_FPUSED 0x0001 /* Process used the FPU */
+#ifndef NO_IEEE
+#define MDP_FP_C 0x7ffffe /* Extended FP_C Quadword bits */
+#endif
#define MDP_STEP1 0x0002 /* Single step normal */
#define MDP_STEP2 0x0003 /* Single step branch */