mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-14 09:01:07 +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 | ||
_exit.c | ||
access.c | ||
backtrace.c | ||
brk.c | ||
chdir.c | ||
check_fds.c | ||
chmod.c | ||
clock_getres.c | ||
clock_gettime.c | ||
clock.c | ||
close.c | ||
configure | ||
configure.ac | ||
createthread.c | ||
dl-fileid.h | ||
dl-map-segments.h | ||
dl-osinfo.h | ||
dl-sysdep-open.h | ||
dl-sysdep.c | ||
dl-sysdep.h | ||
dl-unmap-segments.h | ||
dl-writev.h | ||
dup2.c | ||
dup.c | ||
entry.h | ||
errnos.awk | ||
euidaccess.c | ||
exit-thread.h | ||
fchdir.c | ||
fchmod.c | ||
fdatasync.c | ||
fdopendir.c | ||
fork.c | ||
fsync.c | ||
ftruncate64.c | ||
ftruncate.c | ||
futex-internal.h | ||
fxstat64.c | ||
fxstat.c | ||
getcwd.c | ||
getdents64.c | ||
getdents.c | ||
getdtsz.c | ||
gethostname.c | ||
getpagesize.c | ||
getpid.c | ||
getsysstats.c | ||
gettimeofday.c | ||
glob64.c | ||
glob.c | ||
ifaddrs.c | ||
Implies | ||
init-first.c | ||
iofdopen.c | ||
irt.sed | ||
isatty.c | ||
kernel-features.h | ||
ld.abilist | ||
ldsodefs.h | ||
libanl.abilist | ||
libBrokenLocale.abilist | ||
libc-start.c | ||
libcrypt.abilist | ||
libdl.abilist | ||
libm.abilist | ||
libpthread.abilist | ||
libresolv.abilist | ||
librt.abilist | ||
libutil.abilist | ||
link.c | ||
lll_timedlock_wait.c | ||
lll_timedwait_tid.c | ||
lowlevellock-futex.h | ||
lowlevellock.h | ||
lseek64.c | ||
lseek.c | ||
lxstat64.c | ||
lxstat.c | ||
Makefile | ||
mkdir.c | ||
mmap64.c | ||
mmap.c | ||
mprotect.c | ||
munmap.c | ||
nacl_interface_ext_supply.c | ||
nacl_interface_query.c | ||
nacl-after-link.sh | ||
nacl-interface-list.h | ||
nacl-interface-table.c | ||
nacl-interfaces.c | ||
nacl-interfaces.h | ||
nacl-interfaces.mk.in | ||
nacl-test-wrapper.sh | ||
nanosleep.c | ||
open64.c | ||
open.c | ||
preconfigure | ||
profil.c | ||
pthread_condattr_setclock.c | ||
pthread-pids.h | ||
read.c | ||
readdir64_r.c | ||
readdir64.c | ||
readdir_r.c | ||
readdir.c | ||
readlink.c | ||
rename.c | ||
rmdir.c | ||
sched_yield.c | ||
shlib-versions | ||
sigaction.c | ||
sprofil.c | ||
start.c | ||
Subdirs | ||
symlink.c | ||
tls.h | ||
truncate64.c | ||
truncate.c | ||
uname-values.h | ||
unlink.c | ||
utimes.c | ||
Versions | ||
write.c | ||
xstat64.c | ||
xstat.c | ||
xstatconv.c | ||
xstatconv.h |