mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-15 17:40: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. |
||
---|---|---|
.. | ||
bits | ||
include/bits | ||
e_acoshl.c | ||
e_asinl.c | ||
e_atanhl.c | ||
e_coshl.c | ||
e_gammal_r.c | ||
e_hypotl.c | ||
e_j0l.c | ||
e_j1l.c | ||
e_jnl.c | ||
e_lgammal_r.c | ||
e_rem_pio2l.c | ||
e_sinhl.c | ||
gamma_product.c | ||
gamma_productl.c | ||
k_cosl.c | ||
k_sinl.c | ||
k_tanl.c | ||
ldbl2mpn.c | ||
lgamma_negl.c | ||
lgamma_product.c | ||
lgamma_productl.c | ||
Makefile | ||
math_ldbl.h | ||
mpn2ldbl.c | ||
printf_fphex.c | ||
s_asinhl.c | ||
s_cbrtl.c | ||
s_copysignl.c | ||
s_cosl.c | ||
s_erfl.c | ||
s_fma.c | ||
s_fmal.c | ||
s_frexpl.c | ||
s_getpayloadl.c | ||
s_iscanonicall.c | ||
s_issignalingl.c | ||
s_llrintl.c | ||
s_llroundl.c | ||
s_lrintl.c | ||
s_lroundl.c | ||
s_modfl.c | ||
s_nexttoward.c | ||
s_nexttowardf.c | ||
s_nextupl.c | ||
s_remquol.c | ||
s_roundl.c | ||
s_scalblnl.c | ||
s_setpayloadl_main.c | ||
s_setpayloadl.c | ||
s_setpayloadsigl.c | ||
s_signbitl.c | ||
s_sincosl.c | ||
s_sinl.c | ||
s_tanhl.c | ||
s_tanl.c | ||
s_totalorderl.c | ||
s_totalordermagl.c | ||
strtod_nan_ldouble.h | ||
strtold_l.c | ||
t_sincosl.c | ||
test-canonical-ldbl-96.c | ||
test-totalorderl-ldbl-96.c | ||
w_expl.c | ||
x2y2m1.c | ||
x2y2m1l.c |