mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 05:20:06 +00:00
457663a7cd
TS 18661-1 defines functions for manipulating the payloads of NaNs. This patch implements the setpayloadsig functions for glibc; these are like the setpayload functions, but produce a signaling NaN instead of a quiet NaN. The substance of the implementation was included with the setpayload implementation, so the new files here just need to wrap the main files with different defines to build the new functions. Because the functions store a signaling NaN via a pointer and the libm-test macros choose a suitable initial value for the variable in such a case by comparing with the expected value, the relevant macro needs to clear exceptions after FE_INVALID may have been raised by that comparison. Tested for x86_64, x86, mips64 and powerpc. * math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (setpayloadsig): New declaration. * math/Versions (setpayloadsig): New libm symbol at version GLIBC_2.25. (setpayloadsigf): Likewise. (setpayloadsigl): Likewise. * math/Makefile (libm-calls): Add s_setpayloadsigF. * math/libm-test.inc (RUN_TEST_Ff_b1): Call feclearexcept (FE_ALL_EXCEPT) after initializing EXTRA_VAR. (setpayloadsig_test_data): New array. (setpayloadsig_test): New function. (main): Call setpayloadsig_test. * manual/arith.texi (FP Bit Twiddling): Document setpayloadsig, setpayloadsigf and setpayloadsigl. * manual/libm-err-tab.pl: Update comment on interfaces without ulps tabulated. * sysdeps/ieee754/dbl-64/s_setpayloadsig.c: New file. * sysdeps/ieee754/flt-32/s_setpayloadsigf.c: Likewise. * sysdeps/ieee754/ldbl-128/s_setpayloadsigl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_setpayloadsigl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_setpayloadsigl.c: Likewise. * sysdeps/ieee754/ldbl-opt/nldbl-setpayloadsig.c: Likewise. * sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add setpayloadsig. (CFLAGS-nldbl-setpayloadsig.c): New variable. * sysdeps/nacl/libm.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise. |
||
---|---|---|
.. | ||
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_getpayloadf.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_setpayloadf_main.c | ||
s_setpayloadf.c | ||
s_setpayloadsigf.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 |