glibc/sysdeps/ieee754/ldbl-128ibm
Joseph Myers 6f322a8947 Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1.
This patch moves the HIGH_ORDER_BIT_IS_SET_FOR_SNAN macro from being
defined or undefined to the preferred convention of always being
defined, to either 0 or 1, so allowing typo-proof tests with #if.

The macro is moved from math_private.h to a new header
nan-high-order-bit.h to make it easy for all architectures to define,
either through the sysdeps/generic version of the header or through
providing their own version of the header, without needing #ifndef in
the generic math_private.h to give a default definition.  The move
also allows the macro to be used without needing math_private.h to be
included; the immediate motivation of this patch is to allow tests to
access this information (to know what kinds of NaNs 0 is a valid
payload for) without needing to include math_private.h.  Existing
C level rather than preprocessor conditionals at all, but this patch
does not make such a change).

Tested for x86_64 and x86 (testsuite); also verified for x86_64, x86,
mips64 and powerpc that installed stripped shared libraries are
unchanged by the patch.

	* sysdeps/generic/nan-high-order-bit.h: New file.
	* sysdeps/hppa/nan-high-order-bit.h: Likewise.
	* sysdeps/mips/nan-high-order-bit.h: Likewise.
	* sysdeps/hppa/math_private.h: Remove file.
	* sysdeps/mips/math_private.h (HIGH_ORDER_BIT_IS_SET_FOR_SNAN): Do
	not define here.
	* sysdeps/ieee754/dbl-64/s_issignaling.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/dbl-64/s_totalorder.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/dbl-64/s_totalordermag.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_issignaling.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/flt-32/s_issignalingf.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/flt-32/s_totalorderf.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/flt-32/s_totalordermagf.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/ldbl-128/s_issignalingl.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/ldbl-128/s_totalorderl.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/ldbl-128/s_totalordermagl.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/ldbl-128ibm/s_issignalingl.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/ldbl-128ibm/s_totalorderl.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/ldbl-128ibm/s_totalordermagl.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/ldbl-96/s_issignalingl.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/ldbl-96/s_totalorderl.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
	* sysdeps/ieee754/ldbl-96/s_totalordermagl.c: Include
	<nan-high-order-bit.h>.
	[HIGH_ORDER_BIT_IS_SET_FOR_SNAN]: Test with #if not #ifdef.
2016-10-17 22:48:51 +00:00
..
bits Fix ldbl-128ibm iscanonical for -mlong-double-64. 2016-09-30 15:08:08 +00:00
e_acoshl.c Fix ldbl-128ibm acoshl inaccuracy (bug 18019). 2015-02-25 00:01:15 +00:00
e_acosl.c This patch renames all uses of __isinf*, __isnan*, __finite* and __signbit* to use standard C99 macros. This has no effect on generated code. 2015-06-03 15:41:36 +01:00
e_asinl.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
e_atan2l.c PowerPC floating point little-endian [3 of 15] 2013-10-04 10:32:36 +09:30
e_atanhl.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
e_coshl.c Fix cosh spurious underflows from expm1 (bug 16354), inaccurate results near 0 (bug 17061). 2014-06-23 20:20:10 +00:00
e_exp10l.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_expl.c ldbl-128: Rename 'long double' to '_Float128' 2016-08-31 10:38:11 -05:00
e_fmodl.c Fix ldbl-128ibm fmodl handling of equal arguments with low part zero (bug 19602). 2016-02-18 22:54:07 +00:00
e_gammal_r.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_hypotl.c Fix hypot missing underflows (bug 18803). 2015-09-24 23:43:57 +00:00
e_ilogbl.c Fix ldbl-128ibm ilogbl near powers of 2 (bug 18029). 2015-02-26 12:57:21 +00:00
e_j0l.c ldbl-128: Rename 'long double' to '_Float128' 2016-08-31 10:38:11 -05:00
e_j1l.c ldbl-128: Rename 'long double' to '_Float128' 2016-08-31 10:38:11 -05:00
e_jnl.c Fix j1, jn missing errno setting on underflow (bug 18611). 2015-10-23 21:37:33 +00:00
e_lgammal_r.c ldbl-128: Rename 'long double' to '_Float128' 2016-08-31 10:38:11 -05:00
e_log2l.c Convert 231 sysdeps function definitions to prototype style. 2015-10-19 12:04:33 +00:00
e_log10l.c Fix log10 (1) in round-downward mode (bug 16977). 2014-05-23 12:07:50 +00:00
e_logl.c Fix ldbl-128ibm logl inaccuracy near 1 (bug 19351). 2015-12-09 23:51:11 +00:00
e_powl.c Fix ldbl-128ibm powl overflow handling (bug 19674). 2016-02-19 01:07:40 +00:00
e_rem_pio2l.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_remainderl.c Fix ldbl-128ibm remainderl equality test for zero low part (bug 19677). 2016-03-08 00:27:21 +00:00
e_sinhl.c Fix ldbl-128ibm sinhl spurious overflows (bug 19350). 2015-12-09 22:37:08 +00:00
e_sqrtl.c Fix ldbl-128ibm sqrtl (sNaN) (bug 20153). 2016-05-26 22:58:36 +00:00
gamma_productl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ieee754.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
k_cosl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
k_sincosl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
k_sinl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
k_tanl.c Remove GCC version conditionals on -Wmaybe-uninitialized pragmas. 2015-10-27 23:42:20 +00:00
ldbl2mpn.c Increase internal precision of ldbl-128ibm decimal printf [BZ #19853] 2016-03-31 12:14:33 -05:00
lgamma_negl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
lgamma_productl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Makefile Add totalorder, totalorderf, totalorderl. 2016-10-12 01:20:30 +00:00
math_ldbl.h Fix ldbl-128ibm floorl for non-default rounding modes (bug 17899). 2016-02-18 21:31:10 +00:00
mpn2ldbl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
printf_fphex.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_asinhl.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
s_atanl.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
s_cbrtl.c ldbl-128: Rename 'long double' to '_Float128' 2016-08-31 10:38:11 -05:00
s_ceill.c Fix ldbl-128ibm ceill, rintl etc. for sNaN arguments (bug 20156). 2016-05-27 13:59:24 +00:00
s_copysignl.c Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
s_cosl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_erfl.c Remove unused variables 2016-01-27 09:30:16 +01:00
s_expm1l.c Fix ldbl-128ibm expm1l (sNaN) (bug 20233). 2016-06-09 17:24:52 +00:00
s_fabsl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_finitel.c Reduce number of constants in __finite* (bug 15384). 2015-09-17 16:47:14 +00:00
s_floorl.c Fix ldbl-128ibm ceill, rintl etc. for sNaN arguments (bug 20156). 2016-05-27 13:59:24 +00:00
s_fmal.c Merge common usage of mul_split function 2016-08-19 11:29:43 -05:00
s_fpclassifyl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_frexpl.c Fix frexp (NaN) (bug 20250). 2016-06-13 17:27:19 +00:00
s_iscanonicall.c Add iscanonical. 2016-09-30 00:27:50 +00:00
s_isinfl.c Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
s_isnanl.c Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
s_issignalingl.c Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1. 2016-10-17 22:48:51 +00:00
s_llrintl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_llroundl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_log1pl.c Fix ldbl-128ibm log1pl (sNaN) (bug 20234). 2016-06-09 17:25:54 +00:00
s_logbl.c Work around powerpc32 integer 0 converting to -0 (bug 887, bug 19049, bug 19050). 2015-10-05 17:46:50 +00:00
s_lrintl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_lroundl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_modfl.c Remove IS_IN_libm 2014-11-24 11:41:47 +05:30
s_nearbyintl.c Fix ldbl-128ibm nearbyintl in non-default rounding modes (bug 19790). 2016-03-09 00:30:59 +00:00
s_nextafterl.c Fix ldbl-128ibm nextafterl, nexttowardl sign of zero result (bug 19678). 2016-02-19 17:19:53 +00:00
s_nexttoward.c Make nextafter, nexttoward set errno (bug 6799). 2015-11-02 18:54:19 +00:00
s_nexttowardf.c Make nextafter, nexttoward set errno (bug 6799). 2015-11-02 18:54:19 +00:00
s_nextupl.c Add nextup and nextdown math functions 2016-06-16 21:37:45 +05:30
s_remquol.c Fix ldbl-128ibm remainderl, remquol equality tests (bug 19603). 2016-02-19 00:55:46 +00:00
s_rintl.c Fix ldbl-128ibm ceill, rintl etc. for sNaN arguments (bug 20156). 2016-05-27 13:59:24 +00:00
s_roundl.c Fix ldbl-128ibm ceill, rintl etc. for sNaN arguments (bug 20156). 2016-05-27 13:59:24 +00:00
s_scalblnl.c [BZ #6803] Set errno for scalbln, scalbn 2014-06-20 07:48:20 +05:30
s_scalbnl.c Make scalbn set errno (bug 6803). 2015-09-16 21:11:00 +00:00
s_signbitl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_sincosl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_sinl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_tanhl.c Fix ldbl-128ibm tanhl inaccuracy for small arguments (bug 19349). 2015-12-09 21:20:18 +00:00
s_tanl.c PowerPC floating point little-endian [2 of 15] 2013-10-04 10:32:19 +09:30
s_totalorderl.c Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1. 2016-10-17 22:48:51 +00:00
s_totalordermagl.c Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1. 2016-10-17 22:48:51 +00:00
s_truncl.c Fix ldbl-128ibm ceill, rintl etc. for sNaN arguments (bug 20156). 2016-05-27 13:59:24 +00:00
strtod_nan_ldouble.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strtold_l.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
t_sincosl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
test-fmodl-ldbl-128ibm.c Fix ldbl-128ibm remainderl equality test for zero low part (bug 19677). 2016-03-08 00:27:21 +00:00
test-fmodrem-ldbl-128ibm.c Fix ldbl-128ibm remainderl equality test for zero low part (bug 19677). 2016-03-08 00:27:21 +00:00
test-iscanonical-ldbl-128ibm.c Add iscanonical. 2016-09-30 00:27:50 +00:00
test-remainderl-ldbl-128ibm.c Fix ldbl-128ibm remainderl equality test for zero low part (bug 19677). 2016-03-08 00:27:21 +00:00
test-remquol-ldbl-128ibm.c Fix ldbl-128ibm remainderl equality test for zero low part (bug 19677). 2016-03-08 00:27:21 +00:00
test-totalorderl-ldbl-128ibm.c Add totalordermag, totalordermagf, totalordermagl. 2016-10-15 00:36:48 +00:00
tst-strtold-ldbl-128ibm.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
w_expl.c Fix ldbl-128ibm expl overflow in non-default rounding modes (bug 19078). 2015-10-06 17:37:49 +00:00
w_log1pl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
w_scalblnl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
x2y2m1l.c Merge common usage of mul_split function 2016-08-19 11:29:43 -05:00