summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1995-04-09 21:30:52 +0000
committermycroft <mycroft@NetBSD.org>1995-04-09 21:30:52 +0000
commit4da3c343e12ed413756f04599fa48555c2c2edb5 (patch)
treea4edf1114323648a799daae0a8e5d28763ed85cc /include
parent42d9c8af6c60fd37e3911878c7e7c2ea1e545a13 (diff)
Correct fp_rnd for i386. Add FP_X_* for m68k.
Diffstat (limited to 'include')
-rw-r--r--include/ieeefp.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/include/ieeefp.h b/include/ieeefp.h
index a514fa05978..56e892d74b7 100644
--- a/include/ieeefp.h
+++ b/include/ieeefp.h
@@ -9,31 +9,35 @@
#include <sys/cdefs.h>
typedef int fp_except;
-#ifdef __i386__
+#if defined(__i386__)
#define FP_X_INV 0x01 /* invalid operation exception */
#define FP_X_DNML 0x02 /* denormalization exception */
#define FP_X_DZ 0x04 /* divide-by-zero exception */
#define FP_X_OFL 0x08 /* overflow exception */
#define FP_X_UFL 0x10 /* underflow exception */
#define FP_X_IMP 0x20 /* imprecise (loss of precision) */
+#elif defined(__m68k__)
+#define FP_X_IMP 0x08 /* imprecise (loss of precision) */
+#define FP_X_DZ 0x10 /* divide-by-zero exception */
+#define FP_X_UFL 0x20 /* underflow exception */
+#define FP_X_OFL 0x40 /* overflow exception */
+#define FP_X_INV 0x80 /* invalid operation exception */
#endif
#if defined(__i386__)
typedef enum {
FP_RN=0, /* round to nearest representable number */
- FP_RP=1, /* round to positive infinity */
- FP_RM=2, /* round to negative infinity */
+ FP_RM=1, /* round toward negative infinity */
+ FP_RP=2, /* round toward positive infinity */
FP_RZ=3 /* round to zero (truncate) */
-} fp_rnd ;
-
+} fp_rnd;
#elif defined(__m68k__)
typedef enum {
FP_RN=0, /* round to nearest representable number */
FP_RZ=1, /* round to zero (truncate) */
- FP_RM=2, /* round to negative infinity */
- FP_RP=3 /* round to positive infinity */
-} fp_rnd ;
-
+ FP_RM=2, /* round toward negative infinity */
+ FP_RP=3 /* round toward positive infinity */
+} fp_rnd;
#endif
extern fp_rnd fpgetround __P((void));