glibc/sysdeps/unix/sysv/linux/i386
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
..
i686 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
i786 Move remaining nptl/sysdeps/unix/sysv/linux/i386/ files. 2014-05-14 13:37:40 -07:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
Makefile Do not override objects in libc.a in other static libraries [BZ #20452] 2016-08-17 14:57:01 +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
_exit.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
alphasort64.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00: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
c++-types.data x86: Move abilist files out of nptl/ subdirectories. 2014-05-14 15:45:23 -07:00
clone.S Fix clone (CLONE_VM) pid/tid reset (BZ#19957) 2016-04-29 18:19:30 -03:00
configure Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere. 2016-02-24 17:15:12 +00:00
configure.ac Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere. 2016-02-24 17:15:12 +00:00
dl-librecon.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-procinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fcntl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fxstat.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fxstatat.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
get_clockfreq.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
getcontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
getdents64.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
getmsg.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
getrlimit64.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
gettimeofday.c i386, x86: Use libc_ifunc macro for time, gettimeofday. 2016-10-07 10:12:42 +02:00
glob64.c CVE-2016-1234: glob: Do not copy d_name field of struct dirent [BZ #19779] 2016-05-04 12:09:35 +02:00
init-first.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
kernel-features.h Adjust kernel-features.h defaults for recvmsg and sendmsg 2016-05-25 17:27:57 -03:00
ld.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
ldconfig.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libBrokenLocale.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libanl.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libc-do-syscall.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
libc.abilist Minimize sysdeps code involved in defining major/minor/makedev. 2016-08-03 15:23:04 -04:00
libcrypt.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libdl.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libm.abilist Add getpayload, getpayloadf, getpayloadl. 2016-10-19 01:49:09 +00:00
libnsl.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libpthread.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libresolv.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
librt.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libthread_db.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libutil.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
lll_timedlock_wait.c Move sysdeps/unix/sysv/linux/i386/i486/*.? to i386 2015-09-30 10:12:44 -07:00
lll_timedwait_tid.c Move sysdeps/unix/sysv/linux/i386/i486/*.? to i386 2015-09-30 10:12:44 -07:00
localplt.data Support PLT and GOT references in local PIC check 2015-10-14 06:00:02 -07:00
lockf64.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00: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
lxstat.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
makecontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
mmap.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
olddirent.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
oldgetrlimit64.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 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
pthread_cond_signal.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
pthread_cond_timedwait.S x86, pthread_cond_*wait: Do not depend on %eax not being clobbered 2016-03-23 13:40:14 +01:00
pthread_cond_wait.S x86, pthread_cond_*wait: Do not depend on %eax not being clobbered 2016-03-23 13:40:14 +01:00
putmsg.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
readdir64.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
readdir64_r.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
readelflib.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
scandir64.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
setegid.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
seteuid.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setgid.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setgroups.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setregid.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setresgid.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setresuid.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setreuid.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setuid.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
shlib-versions Clean up gnu/lib-names.h generation (bug 14171). 2014-09-26 17:33:04 +00:00
sigaction.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
smp.h 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 Fix linux personality syscall wrapper 2015-12-31 00:17:48 +00:00
sysdep-cancel.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sysdep.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
time.c i386, x86: Use libc_ifunc macro for time, gettimeofday. 2016-10-07 10:12:42 +02:00
ucontext_i.sym
versionsort64.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
xstat.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00