summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
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));