glibc/sysdeps/unix/sysv/linux/x86_64
Joseph Myers f8e8b8ed9f Add getpayload, getpayloadf, getpayloadl.
TS 18661-1 defines functions for manipulating the payloads of NaNs.
This patch implements the getpayload functions for glibc; these
extract the NaN payload (from an argument passed as a pointer, for
which corresponding libm-test support is added) and return it in the
same floating-point type.  The return value of these functions is
unspecified for non-NaN arguments; the patch does the simplest thing
to implement, which is that the functions do not check whether the
argument is a NaN and just treat the relevant bits of the
representation as a payload regardless.  A conversion from integer to
floating-point is used to produce the required return value, except in
the ldbl-128 case; as 128-bit integers are not supported for all
configurations using ldbl-128, the code constructs the required
floating-point representation of the return value directly instead.

Tested for x86_64, x86, mips64 and powerpc.

	* math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)]
	(getpayload): New declaration.
	* math/Versions (getpayload): New libm symbol at version
	GLIBC_2.25.
	(getpayloadf): Likewise.
	(getpayloadl): Likewise.
	* math/Makefile (libm-calls): Add s_getpayloadF.
	* math/libm-test.inc: Include <nan-high-order-bit.h>.
	(struct test_f_f_data): Add comment.
	(RUN_TEST_fp_f): New macro.
	(RUN_TEST_LOOP_fp_f): Likewise.
	(getpayload_test_data): New array.
	(getpayload_test): New function.
	(main): Call getpayload_test.
	* math/gen-libm-test.pl (parse_args): Handle 'p' in argument
	descriptor.
	* manual/arith.texi (FP Bit Twiddling): Document getpayload,
	getpayloadf and getpayloadl.
	* manual/libm-err-tab.pl: Update comment on interfaces without
	ulps tabulated.
	* sysdeps/ieee754/dbl-64/s_getpayload.c: New file.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c: Likewise.
	* sysdeps/ieee754/flt-32/s_getpayloadf.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_getpayloadl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_getpayloadl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_getpayloadl.c: Likewise.
	* 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.
2016-10-19 01:49:09 +00:00
..
64 Add getpayload, getpayloadf, getpayloadl. 2016-10-19 01:49:09 +00:00
x32 Add getpayload, getpayloadf, getpayloadl. 2016-10-19 01:49:09 +00:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
Makefile Add x86 32 bit vDSO time function support 2015-01-12 16:03:58 -02:00
Versions Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
__start_context.S Call x86-64 __setcontext directly 2016-03-01 16:55:36 -08:00
arch-fork.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
brk.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
cancellation.S Don't call internal __pthread_unwind via PLT 2016-05-18 13:41:55 -07:00
clone.S Fix clone (CLONE_VM) pid/tid reset (BZ#19957) 2016-04-29 18:19:30 -03:00
compat-timer.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
configure Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
configure.ac Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
dl-cache.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-procinfo.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
dl-procinfo.h Remove IS_IN_ldconfig 2014-11-24 11:41:43 +05:30
get_clockfreq.c Update. 2003-05-09 07:53:33 +00:00
getcontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
init-first.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
kernel-features.h Consolidate off_t/off64_t syscall argument passing 2016-04-11 10:07:53 -03:00
kernel_stat.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ldconfig.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ldd-rewrite.sed Add x32 support to ldd-rewrite.sed 2012-03-19 15:18:44 -07:00
libc-cancellation.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libc-lowlevellock.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libmvec.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
librt-cancellation.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
lll_timedlock_wait.c Split timed-wait functions out of nptl/lowlevellock.c. 2015-05-26 14:49:13 -07:00
lll_timedwait_tid.c Split timed-wait functions out of nptl/lowlevellock.c. 2015-05-26 14:49:13 -07:00
lowlevellock.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
lowlevellock.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
lowlevelrobustlock.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
makecontext.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
profil-counter.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
pthread_cond_broadcast.S 2016-01-20 Paul Pluzhnikov <ppluzhnikov@google.com> 2016-01-20 13:39:20 -08:00
pthread_cond_signal.S 2016-01-20 Paul Pluzhnikov <ppluzhnikov@google.com> 2016-01-20 13:39:20 -08:00
pthread_cond_timedwait.S Don't call internal _Unwind_Resume via PLT 2016-05-18 13:43:26 -07:00
pthread_cond_wait.S Don't call internal _Unwind_Resume via PLT 2016-05-18 13:43:26 -07:00
pthread_setaffinity.c Move remaining nptl/sysdeps/unix/sysv/linux/x86_64/ files. 2014-05-14 12:33:43 -07:00
readelflib.c Add x32 support to ldconfig 2012-03-16 15:20:45 -07:00
recv.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
register-dump.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sched_setaffinity.c * sysdeps/unix/sysv/linux/sched_setaffinity.c 2007-05-10 23:38:55 +00:00
send.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setcontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigaction.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigaltstack-offsets.sym Use R*_LP, sizeSS, oSS_FLAGS, oSS_SP and oSS_SIZE 2012-05-15 16:43:11 -07:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigpending.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigprocmask.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
swapcontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
syscall.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
syscalls.list Consolidate posix_fallocate{64} implementations 2016-10-07 14:16:41 -03:00
sysdep-cancel.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sysdep.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sysdep.h X86-64: Define LO_HI_LONG to skip pos_h [BZ #20349] 2016-07-11 15:32:23 -07:00
timer_create.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
timer_delete.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
timer_getoverr.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
timer_gettime.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
timer_settime.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ucontext_i.sym . 2007-07-31 13:33:18 +00:00
umount.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
vfork.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00