diff options
author | Joseph Myers <joseph@codesourcery.com> | 2014-10-09 19:21:30 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2014-10-09 19:21:30 +0100 |
commit | 5f60643158669361212ef79bfec16e8c73f4c138 (patch) | |
tree | 77a4f889c3807e7f78e206208cc84647a983fe05 /libgcc/soft-fp/soft-fp.h | |
parent | c386686921f2eecb9f1a419def40b6b55732da98 (diff) | |
download | gcc-5f60643158669361212ef79bfec16e8c73f4c138.zip gcc-5f60643158669361212ef79bfec16e8c73f4c138.tar.gz gcc-5f60643158669361212ef79bfec16e8c73f4c138.tar.bz2 |
Update soft-fp from glibc.
This patch updates libgcc's copy of soft-fp from glibc, adding a
testcase for a bug fix this brings in.
Bootstrapped with no regressions on x86_64-unknown-linux-gnu.
libgcc:
* soft-fp/double.h: Update from glibc.
* soft-fp/eqdf2.c: Likewise.
* soft-fp/eqsf2.c: Likewise.
* soft-fp/eqtf2.c: Likewise.
* soft-fp/extenddftf2.c: Likewise.
* soft-fp/extended.h: Likewise.
* soft-fp/extendsfdf2.c: Likewise.
* soft-fp/extendsftf2.c: Likewise.
* soft-fp/extendxftf2.c: Likewise.
* soft-fp/gedf2.c: Likewise.
* soft-fp/gesf2.c: Likewise.
* soft-fp/getf2.c: Likewise.
* soft-fp/ledf2.c: Likewise.
* soft-fp/lesf2.c: Likewise.
* soft-fp/letf2.c: Likewise.
* soft-fp/op-1.h: Likewise.
* soft-fp/op-2.h: Likewise.
* soft-fp/op-4.h: Likewise.
* soft-fp/op-8.h: Likewise.
* soft-fp/op-common.h: Likewise.
* soft-fp/quad.h: Likewise.
* soft-fp/single.h: Likewise.
* soft-fp/soft-fp.h: Likewise.
* soft-fp/unorddf2.c: Likewise.
* soft-fp/unordsf2.c: Likewise.
* soft-fp/unordtf2.c: Likewise.
* config/c6x/eqd.c (__c6xabi_eqd): Update call to FP_CMP_EQ_D.
* config/c6x/eqf.c (__c6xabi_eqf): Update call to FP_CMP_EQ_S.
* config/c6x/ged.c (__c6xabi_ged): Update call to FP_CMP_D.
* config/c6x/gef.c (__c6xabi_gef): Update call to FP_CMP_S.
* config/c6x/gtd.c (__c6xabi_gtd): Update call to FP_CMP_D.
* config/c6x/gtf.c (__c6xabi_gtf): Update call to FP_CMP_S.
* config/c6x/led.c (__c6xabi_led): Update call to FP_CMP_D.
* config/c6x/lef.c (__c6xabi_lef): Update call to FP_CMP_S.
* config/c6x/ltd.c (__c6xabi_ltd): Update call to FP_CMP_D.
* config/c6x/ltf.c (__c6xabi_ltf): Update call to FP_CMP_S.
gcc/testsuite:
* gcc.dg/torture/float128-extendxf-underflow.c: New test.
From-SVN: r216048
Diffstat (limited to 'libgcc/soft-fp/soft-fp.h')
-rw-r--r-- | libgcc/soft-fp/soft-fp.h | 75 |
1 files changed, 65 insertions, 10 deletions
diff --git a/libgcc/soft-fp/soft-fp.h b/libgcc/soft-fp/soft-fp.h index 8d0efa5..05fcca0 100644 --- a/libgcc/soft-fp/soft-fp.h +++ b/libgcc/soft-fp/soft-fp.h @@ -38,7 +38,7 @@ # include "sfp-machine.h" #endif -/* Allow sfp-machine to have its own byte order definitions. */ +/* Allow sfp-machine to have its own byte order definitions. */ #ifndef __BYTE_ORDER # ifdef _LIBC # include <endian.h> @@ -63,7 +63,7 @@ # define FP_ROUNDMODE FP_RND_NEAREST #endif -/* By default don't care about exceptions. */ +/* By default don't care about exceptions. */ #ifndef FP_EX_INVALID # define FP_EX_INVALID 0 #endif @@ -83,6 +83,44 @@ # define FP_EX_DENORM 0 #endif +/* Sub-exceptions of "invalid". */ +/* Signaling NaN operand. */ +#ifndef FP_EX_INVALID_SNAN +# define FP_EX_INVALID_SNAN 0 +#endif +/* Inf * 0. */ +#ifndef FP_EX_INVALID_IMZ +# define FP_EX_INVALID_IMZ 0 +#endif +/* fma (Inf, 0, c). */ +#ifndef FP_EX_INVALID_IMZ_FMA +# define FP_EX_INVALID_IMZ_FMA 0 +#endif +/* Inf - Inf. */ +#ifndef FP_EX_INVALID_ISI +# define FP_EX_INVALID_ISI 0 +#endif +/* 0 / 0. */ +#ifndef FP_EX_INVALID_ZDZ +# define FP_EX_INVALID_ZDZ 0 +#endif +/* Inf / Inf. */ +#ifndef FP_EX_INVALID_IDI +# define FP_EX_INVALID_IDI 0 +#endif +/* sqrt (negative). */ +#ifndef FP_EX_INVALID_SQRT +# define FP_EX_INVALID_SQRT 0 +#endif +/* Invalid conversion to integer. */ +#ifndef FP_EX_INVALID_CVI +# define FP_EX_INVALID_CVI 0 +#endif +/* Invalid comparison. */ +#ifndef FP_EX_INVALID_VC +# define FP_EX_INVALID_VC 0 +#endif + /* _FP_STRUCT_LAYOUT may be defined as an attribute to determine the struct layout variant used for structures where bit-fields are used to access specific parts of binary floating-point numbers. This is @@ -108,30 +146,37 @@ #endif /* Initialize any machine-specific state used in + FP_TRAPPING_EXCEPTIONS or FP_HANDLE_EXCEPTIONS. */ +#ifndef FP_INIT_TRAPPING_EXCEPTIONS +# define FP_INIT_TRAPPING_EXCEPTIONS FP_INIT_ROUNDMODE +#endif + +/* Initialize any machine-specific state used in FP_HANDLE_EXCEPTIONS. */ #ifndef FP_INIT_EXCEPTIONS -# define FP_INIT_EXCEPTIONS FP_INIT_ROUNDMODE +# define FP_INIT_EXCEPTIONS FP_INIT_TRAPPING_EXCEPTIONS #endif #ifndef FP_HANDLE_EXCEPTIONS # define FP_HANDLE_EXCEPTIONS do {} while (0) #endif +/* Whether to flush subnormal inputs to zero with the same sign. */ +#ifndef FP_DENORM_ZERO +# define FP_DENORM_ZERO 0 +#endif + #ifndef FP_INHIBIT_RESULTS /* By default we write the results always. - * sfp-machine may override this and e.g. - * check if some exceptions are unmasked - * and inhibit it in such a case. - */ + sfp-machine may override this and e.g. + check if some exceptions are unmasked + and inhibit it in such a case. */ # define FP_INHIBIT_RESULTS 0 #endif #define FP_SET_EXCEPTION(ex) \ _fex |= (ex) -#define FP_CLEAR_EXCEPTIONS \ - _fex = 0 - #define FP_CUR_EXCEPTIONS \ (_fex) @@ -166,6 +211,16 @@ #endif +/* A file using soft-fp may define FP_NO_EXACT_UNDERFLOW before + including soft-fp.h to indicate that, although a macro used there + could allow for the case of exact underflow requiring the underflow + exception to be raised if traps are enabled, for the particular + arguments used in that file no exact underflow can occur. */ +#ifdef FP_NO_EXACT_UNDERFLOW +# undef FP_TRAPPING_EXCEPTIONS +# define FP_TRAPPING_EXCEPTIONS 0 +#endif + #define _FP_ROUND_NEAREST(wc, X) \ do \ { \ |