aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/mips
diff options
context:
space:
mode:
authorDavid Schultz <das@FreeBSD.org>2012-01-16 04:05:53 +0000
committerDavid Schultz <das@FreeBSD.org>2012-01-16 04:05:53 +0000
commitb1d046441de9053152c7cf03d6b60d9882687e1b (patch)
treef49f535a2f2db035f8401e540a6103d8e9ea9c6a /lib/libc/mips
parentc6c72ab9afa42f71f9b7b18c302bb3569b7e0de1 (diff)
downloadsrc-b1d046441de9053152c7cf03d6b60d9882687e1b.tar.gz
src-b1d046441de9053152c7cf03d6b60d9882687e1b.zip
Convert softfloat to use the standard exception flag and rounding macros
in fenv.h instead of the non-standard and incomplete ones in ieeefp.h. Thanks to Ian Lepore for testing this patch.
Notes
Notes: svn path=/head/; revision=230189
Diffstat (limited to 'lib/libc/mips')
-rw-r--r--lib/libc/mips/softfloat/softfloat.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/libc/mips/softfloat/softfloat.h b/lib/libc/mips/softfloat/softfloat.h
index 50b5fa6fb466..6aef49975a38 100644
--- a/lib/libc/mips/softfloat/softfloat.h
+++ b/lib/libc/mips/softfloat/softfloat.h
@@ -45,7 +45,7 @@ the `FLOAT128' macro and the quadruple-precision format `float128'.
/* #define FLOATX80 */
/* #define FLOAT128 */
-#include <machine/ieeefp.h>
+#include <fenv.h>
/*
-------------------------------------------------------------------------------
@@ -84,12 +84,12 @@ enum {
Software IEC/IEEE floating-point rounding mode.
-------------------------------------------------------------------------------
*/
-extern fp_rnd_t float_rounding_mode;
+extern int float_rounding_mode;
enum {
- float_round_nearest_even = FP_RN,
- float_round_to_zero = FP_RZ,
- float_round_down = FP_RM,
- float_round_up = FP_RP
+ float_round_nearest_even = FE_TONEAREST,
+ float_round_to_zero = FE_TOWARDZERO,
+ float_round_down = FE_DOWNWARD,
+ float_round_up = FE_UPWARD
};
/*
@@ -97,14 +97,14 @@ enum {
Software IEC/IEEE floating-point exception flags.
-------------------------------------------------------------------------------
*/
-extern fp_except float_exception_flags;
-extern fp_except float_exception_mask;
+extern int float_exception_flags;
+extern int float_exception_mask;
enum {
- float_flag_inexact = FP_X_IMP,
- float_flag_underflow = FP_X_UFL,
- float_flag_overflow = FP_X_OFL,
- float_flag_divbyzero = FP_X_DZ,
- float_flag_invalid = FP_X_INV
+ float_flag_inexact = FE_INEXACT,
+ float_flag_underflow = FE_UNDERFLOW,
+ float_flag_overflow = FE_OVERFLOW,
+ float_flag_divbyzero = FE_DIVBYZERO,
+ float_flag_invalid = FE_INVALID
};
/*
@@ -113,7 +113,7 @@ Routine to raise any or all of the software IEC/IEEE floating-point
exception flags.
-------------------------------------------------------------------------------
*/
-void float_raise( fp_except );
+void float_raise( int );
/*
-------------------------------------------------------------------------------