glibc/sysdeps/ieee754/flt-32
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
..
e_acosf.c Fix acosf underflow (bug 14153). 2012-05-25 11:07:07 +00:00
e_acoshf.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_asinf.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
e_atan2f.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_atanhf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_coshf.c Avoid excess range overflowing results from cosh, sinh, lgamma (bug 18980). 2015-09-18 20:00:48 +00:00
e_exp2f.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_expf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_fmodf.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_gammaf_r.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_hypotf.c Simplify hypotf infinity handling (bug 15918). 2015-09-15 17:24:23 +00:00
e_ilogbf.c Remove useless __ilogb*_finite aliases 2012-04-18 00:40:13 +02:00
e_j0f.c Avoid uninitialized warnings in Bessel functions. 2015-02-26 21:49:19 +00:00
e_j1f.c Fix j1, jn missing errno setting on underflow (bug 18611). 2015-10-23 21:37:33 +00:00
e_jnf.c Fix j1, jn missing errno setting on underflow (bug 18611). 2015-10-23 21:37:33 +00:00
e_lgammaf_r.c Remove GCC version conditionals on -Wmaybe-uninitialized pragmas. 2015-10-27 23:42:20 +00:00
e_log2f.c Work around powerpc32 integer 0 converting to -0 (bug 887, bug 19049, bug 19050). 2015-10-05 17:46:50 +00:00
e_log10f.c Work around powerpc32 integer 0 converting to -0 (bug 887, bug 19049, bug 19050). 2015-10-05 17:46:50 +00:00
e_logf.c Fix catan, catanh, __ieee754_logf in round-downward mode (bug 16799, bug 16800). 2014-04-02 17:41:02 +00:00
e_powf.c Fix powf inaccuracy (bug 18956). 2015-09-26 00:27:06 +00:00
e_rem_pio2f.c Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
e_remainderf.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
e_sinhf.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
e_sqrtf.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
k_cosf.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
k_rem_pio2f.c Get rid of array-bounds warning in __kernel_rem_pio2[f] with gcc 6.1 -O3. 2016-08-18 12:20:35 +02:00
k_sinf.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
k_tanf.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
lgamma_negf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
lgamma_productf.c Fix lgamma (negative) inaccuracy (bug 2542, bug 2543, bug 2558). 2015-09-10 22:27:58 +00:00
mpn2flt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_asinhf.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
s_atanf.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
s_cbrtf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_ceilf.c Do not raise "inexact" from generic ceil (bug 15479). 2016-05-24 17:42:10 +00:00
s_copysignf.c Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
s_cosf.c Fix several build failures with GCC6 due to unused static variables. 2015-09-18 20:42:54 +01:00
s_erff.c Work around powerpc32 integer 0 converting to -0 (bug 887, bug 19049, bug 19050). 2015-10-05 17:46:50 +00:00
s_expm1f.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
s_fabsf.c 2015-05-28 Wilco Dijkstra <wdijkstr@arm.com> 2015-05-28 11:42:55 +01:00
s_finitef.c Reduce number of constants in __finite* (bug 15384). 2015-09-17 16:47:14 +00:00
s_floorf.c Do not raise "inexact" from generic floor (bug 15479). 2016-05-24 17:44:46 +00:00
s_fpclassifyf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_frexpf.c Fix frexp (NaN) (bug 20250). 2016-06-13 17:27:19 +00:00
s_isinff.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_isnanf.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_issignalingf.c Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1. 2016-10-17 22:48:51 +00:00
s_llrintf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_llroundf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_log1pf.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
s_logbf.c Work around powerpc32 integer 0 converting to -0 (bug 887, bug 19049, bug 19050). 2015-10-05 17:46:50 +00:00
s_lrintf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_lroundf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_modff.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_nearbyintf.c Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490). 2013-05-19 18:40:25 +00:00
s_nextafterf.c Make nextafter, nexttoward set errno (bug 6799). 2015-11-02 18:54:19 +00:00
s_nextupf.c Add nextup and nextdown math functions 2016-06-16 21:37:45 +05:30
s_remquof.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_rintf.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_roundf.c Do not raise "inexact" from generic round (bug 15479). 2016-05-24 17:46:55 +00:00
s_scalblnf.c [BZ #6803] Set errno for scalbln, scalbn 2014-06-20 07:48:20 +05:30
s_scalbnf.c Make scalbn set errno (bug 6803). 2015-09-16 21:11:00 +00:00
s_signbitf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_sincosf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_sinf.c Add optimized sinf and cosf routines for x86 and x86-64 2012-09-03 15:32:13 +02:00
s_tanf.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_tanhf.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
s_totalorderf.c Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1. 2016-10-17 22:48:51 +00:00
s_totalordermagf.c Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1. 2016-10-17 22:48:51 +00:00
s_truncf.c sparc64: add a VIS3 version of ceil, floor and trunc 2016-08-03 13:35:22 +02:00
t_exp2f.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
w_expf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00