mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 07:20:11 +00:00
6f322a8947
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. |
||
---|---|---|
.. | ||
bits | ||
e_acoshl.c | ||
e_acosl.c | ||
e_asinl.c | ||
e_atan2l.c | ||
e_atanhl.c | ||
e_coshl.c | ||
e_exp10l.c | ||
e_expl.c | ||
e_fmodl.c | ||
e_gammal_r.c | ||
e_hypotl.c | ||
e_ilogbl.c | ||
e_j0l.c | ||
e_j1l.c | ||
e_jnl.c | ||
e_lgammal_r.c | ||
e_log2l.c | ||
e_log10l.c | ||
e_logl.c | ||
e_powl.c | ||
e_rem_pio2l.c | ||
e_remainderl.c | ||
e_sinhl.c | ||
e_sqrtl.c | ||
gamma_productl.c | ||
ieee754.h | ||
k_cosl.c | ||
k_sincosl.c | ||
k_sinl.c | ||
k_tanl.c | ||
ldbl2mpn.c | ||
lgamma_negl.c | ||
lgamma_productl.c | ||
Makefile | ||
math_ldbl.h | ||
mpn2ldbl.c | ||
printf_fphex.c | ||
s_asinhl.c | ||
s_atanl.c | ||
s_cbrtl.c | ||
s_ceill.c | ||
s_copysignl.c | ||
s_cosl.c | ||
s_erfl.c | ||
s_expm1l.c | ||
s_fabsl.c | ||
s_finitel.c | ||
s_floorl.c | ||
s_fmal.c | ||
s_fpclassifyl.c | ||
s_frexpl.c | ||
s_iscanonicall.c | ||
s_isinfl.c | ||
s_isnanl.c | ||
s_issignalingl.c | ||
s_llrintl.c | ||
s_llroundl.c | ||
s_log1pl.c | ||
s_logbl.c | ||
s_lrintl.c | ||
s_lroundl.c | ||
s_modfl.c | ||
s_nearbyintl.c | ||
s_nextafterl.c | ||
s_nexttoward.c | ||
s_nexttowardf.c | ||
s_nextupl.c | ||
s_remquol.c | ||
s_rintl.c | ||
s_roundl.c | ||
s_scalblnl.c | ||
s_scalbnl.c | ||
s_signbitl.c | ||
s_sincosl.c | ||
s_sinl.c | ||
s_tanhl.c | ||
s_tanl.c | ||
s_totalorderl.c | ||
s_totalordermagl.c | ||
s_truncl.c | ||
strtod_nan_ldouble.h | ||
strtold_l.c | ||
t_sincosl.c | ||
test-fmodl-ldbl-128ibm.c | ||
test-fmodrem-ldbl-128ibm.c | ||
test-iscanonical-ldbl-128ibm.c | ||
test-remainderl-ldbl-128ibm.c | ||
test-remquol-ldbl-128ibm.c | ||
test-totalorderl-ldbl-128ibm.c | ||
tst-strtold-ldbl-128ibm.c | ||
w_expl.c | ||
w_log1pl.c | ||
w_scalblnl.c | ||
x2y2m1l.c |