summaryrefslogtreecommitdiff
path: root/soft-fp/soft-fp.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-30 13:41:01 -0700
committerDavid S. Miller <davem@davemloft.net>2012-05-30 13:41:01 -0700
commitae251b0b58b6fff00a572fe1497eddec8433a9d3 (patch)
tree84a641823647c7996b6269b18276e722e9cb8022 /soft-fp/soft-fp.h
parent35c166e492b1c806b1e0c1d26f4e1385a7cfb055 (diff)
downloadglibc-ae251b0b58b6fff00a572fe1497eddec8433a9d3.tar.gz
Fix underflow generation in soft-fp.
* soft-fp/soft-fp.h (FP_CUR_EXCEPTIONS): Define. (FP_TRAPPING_EXCEPTIONS): Provide default implementation. * sysdeps/sparc/sparc32/soft-fp/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Define. * sysdeps/sparc/sparc64/soft-fp/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Define. * soft-fp/op-common.h (_FP_PACK_SEMIRAW): Signal underflow for subnormals only when inexact has been signalled or underflow exceptions are enabled. (_FP_PACK_CANONICAL): Likewise.
Diffstat (limited to 'soft-fp/soft-fp.h')
-rw-r--r--soft-fp/soft-fp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/soft-fp/soft-fp.h b/soft-fp/soft-fp.h
index 46cb1cfaef..750c7fea2d 100644
--- a/soft-fp/soft-fp.h
+++ b/soft-fp/soft-fp.h
@@ -128,6 +128,13 @@
#define FP_CLEAR_EXCEPTIONS \
_fex = 0
+#define FP_CUR_EXCEPTIONS \
+ (_fex)
+
+#ifndef FP_TRAPPING_EXCEPTIONS
+#define FP_TRAPPING_EXCEPTIONS 0
+#endif
+
#define _FP_ROUND_NEAREST(wc, X) \
do { \
if ((_FP_FRAC_LOW_##wc(X) & 15) != _FP_WORK_ROUND) \