mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-14 01:00:07 +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. |
||
---|---|---|
.. | ||
e_acosf.c | ||
e_acoshf.c | ||
e_asinf.c | ||
e_atan2f.c | ||
e_atanhf.c | ||
e_coshf.c | ||
e_exp2f.c | ||
e_expf.c | ||
e_fmodf.c | ||
e_gammaf_r.c | ||
e_hypotf.c | ||
e_ilogbf.c | ||
e_j0f.c | ||
e_j1f.c | ||
e_jnf.c | ||
e_lgammaf_r.c | ||
e_log2f.c | ||
e_log10f.c | ||
e_logf.c | ||
e_powf.c | ||
e_rem_pio2f.c | ||
e_remainderf.c | ||
e_sinhf.c | ||
e_sqrtf.c | ||
k_cosf.c | ||
k_rem_pio2f.c | ||
k_sinf.c | ||
k_tanf.c | ||
lgamma_negf.c | ||
lgamma_productf.c | ||
mpn2flt.c | ||
s_asinhf.c | ||
s_atanf.c | ||
s_cbrtf.c | ||
s_ceilf.c | ||
s_copysignf.c | ||
s_cosf.c | ||
s_erff.c | ||
s_expm1f.c | ||
s_fabsf.c | ||
s_finitef.c | ||
s_floorf.c | ||
s_fpclassifyf.c | ||
s_frexpf.c | ||
s_isinff.c | ||
s_isnanf.c | ||
s_issignalingf.c | ||
s_llrintf.c | ||
s_llroundf.c | ||
s_log1pf.c | ||
s_logbf.c | ||
s_lrintf.c | ||
s_lroundf.c | ||
s_modff.c | ||
s_nearbyintf.c | ||
s_nextafterf.c | ||
s_nextupf.c | ||
s_remquof.c | ||
s_rintf.c | ||
s_roundf.c | ||
s_scalblnf.c | ||
s_scalbnf.c | ||
s_signbitf.c | ||
s_sincosf.c | ||
s_sinf.c | ||
s_tanf.c | ||
s_tanhf.c | ||
s_totalorderf.c | ||
s_totalordermagf.c | ||
s_truncf.c | ||
t_exp2f.h | ||
w_expf.c |