summaryrefslogtreecommitdiffstats
path: root/lib/libc/softfloat
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2012-01-16 04:05:53 +0000
committerdas <das@FreeBSD.org>2012-01-16 04:05:53 +0000
commitd6b9b99e3b746f56d63b97b226e6828b26953d3a (patch)
treef49f535a2f2db035f8401e540a6103d8e9ea9c6a /lib/libc/softfloat
parentb2eac838ccdcf3c8f2a5f094f46aaf83b3b8538f (diff)
downloadFreeBSD-src-d6b9b99e3b746f56d63b97b226e6828b26953d3a.zip
FreeBSD-src-d6b9b99e3b746f56d63b97b226e6828b26953d3a.tar.gz
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.
Diffstat (limited to 'lib/libc/softfloat')
-rw-r--r--lib/libc/softfloat/bits32/softfloat.c4
-rw-r--r--lib/libc/softfloat/bits64/softfloat.c4
-rw-r--r--lib/libc/softfloat/softfloat-specialize4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/softfloat/bits32/softfloat.c b/lib/libc/softfloat/bits32/softfloat.c
index 7785c4e..ad7c016 100644
--- a/lib/libc/softfloat/bits32/softfloat.c
+++ b/lib/libc/softfloat/bits32/softfloat.c
@@ -77,8 +77,8 @@ __FBSDID("$FreeBSD$");
Floating-point rounding mode and exception flags.
-------------------------------------------------------------------------------
*/
-fp_rnd_t float_rounding_mode = float_round_nearest_even;
-fp_except float_exception_flags = 0;
+int float_rounding_mode = float_round_nearest_even;
+int float_exception_flags = 0;
/*
-------------------------------------------------------------------------------
diff --git a/lib/libc/softfloat/bits64/softfloat.c b/lib/libc/softfloat/bits64/softfloat.c
index ffd5661..3d614f2 100644
--- a/lib/libc/softfloat/bits64/softfloat.c
+++ b/lib/libc/softfloat/bits64/softfloat.c
@@ -71,8 +71,8 @@ Floating-point rounding mode, extended double-precision rounding precision,
and exception flags.
-------------------------------------------------------------------------------
*/
-fp_rnd_t float_rounding_mode = float_round_nearest_even;
-fp_except float_exception_flags = 0;
+int float_rounding_mode = float_round_nearest_even;
+int float_exception_flags = 0;
#ifdef FLOATX80
int8 floatx80_rounding_precision = 80;
#endif
diff --git a/lib/libc/softfloat/softfloat-specialize b/lib/libc/softfloat/softfloat-specialize
index e8585ce..2daa90f 100644
--- a/lib/libc/softfloat/softfloat-specialize
+++ b/lib/libc/softfloat/softfloat-specialize
@@ -58,8 +58,8 @@ substitute a result value. If traps are not implemented, this routine
should be simply `float_exception_flags |= flags;'.
-------------------------------------------------------------------------------
*/
-fp_except float_exception_mask = 0;
-void float_raise( fp_except flags )
+int float_exception_mask = 0;
+void float_raise( int flags )
{
float_exception_flags |= flags;
OpenPOWER on IntegriCloud