diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-30 13:41:01 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-30 13:41:01 -0700 |
commit | ae251b0b58b6fff00a572fe1497eddec8433a9d3 (patch) | |
tree | 84a641823647c7996b6269b18276e722e9cb8022 /sysdeps/sparc | |
parent | 35c166e492b1c806b1e0c1d26f4e1385a7cfb055 (diff) | |
download | glibc-ae251b0b58b6fff00a572fe1497eddec8433a9d3.tar.gz glibc-ae251b0b58b6fff00a572fe1497eddec8433a9d3.tar.xz glibc-ae251b0b58b6fff00a572fe1497eddec8433a9d3.zip |
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 'sysdeps/sparc')
-rw-r--r-- | sysdeps/sparc/sparc32/soft-fp/sfp-machine.h | 3 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/soft-fp/sfp-machine.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h b/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h index 4314082f70..e60f1cadaa 100644 --- a/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h +++ b/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent software floating-point definitions. Sparc userland (_Q_*) version. - Copyright (C) 1997,1998,1999, 2002, 2006 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2002,2006,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz) and @@ -192,6 +192,7 @@ do { \ _FPU_GETCW(_fcw); \ } while (0) +#define FP_TRAPPING_EXCEPTIONS ((_fcw >> 23) & 0x1f) #define FP_INHIBIT_RESULTS ((_fcw >> 23) & _fex) /* Simulate exceptions using double arithmetics. */ diff --git a/sysdeps/sparc/sparc64/soft-fp/sfp-machine.h b/sysdeps/sparc/sparc64/soft-fp/sfp-machine.h index 36f92d64fb..9bd4298c9c 100644 --- a/sysdeps/sparc/sparc64/soft-fp/sfp-machine.h +++ b/sysdeps/sparc/sparc64/soft-fp/sfp-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent software floating-point definitions. Sparc64 userland (_Q_* and _Qp_*) version. - Copyright (C) 1997, 1998, 1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2006, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz) and @@ -100,6 +100,7 @@ do { \ _FPU_GETCW(_fcw); \ } while (0) +#define FP_TRAPPING_EXCEPTIONS ((_fcw >> 23) & 0x1f) #define FP_INHIBIT_RESULTS ((_fcw >> 23) & _fex) /* Simulate exceptions using double arithmetics. */ |