glibc/sysdeps/ieee754/ldbl-96
Joseph Myers 457663a7cd Add setpayloadsig, setpayloadsigf, setpayloadsigl.
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.
2016-11-24 23:56:48 +00:00
..
bits Refactor some libm type-generic macros. 2016-11-10 21:41:56 +00:00
include/bits Add canonicalize, canonicalizef, canonicalizel. 2016-10-26 23:14:31 +00:00
e_acoshl.c Fix acosh (1) in round-downward mode (bug 16927). 2014-05-14 12:35:40 +00:00
e_asinl.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
e_atanhl.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
e_coshl.c Fix cosh spurious underflows from expm1 (bug 16354), inaccurate results near 0 (bug 17061). 2014-06-23 20:20:10 +00:00
e_gammal_r.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_hypotl.c Fix hypot missing underflows (bug 18803). 2015-09-24 23:43:57 +00:00
e_j0l.c Avoid uninitialized warnings in Bessel functions. 2015-02-26 21:49:19 +00:00
e_j1l.c Fix j1, jn missing errno setting on underflow (bug 18611). 2015-10-23 21:37:33 +00:00
e_jnl.c Fix j1, jn missing errno setting on underflow (bug 18611). 2015-10-23 21:37:33 +00:00
e_lgammal_r.c Remove GCC version conditionals on -Wmaybe-uninitialized pragmas. 2015-10-27 23:42:20 +00:00
e_rem_pio2l.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_sinhl.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
gamma_product.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
gamma_productl.c Merge common usage of mul_split function 2016-08-19 11:29:43 -05:00
k_cosl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
k_sinl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
k_tanl.c Remove GCC version conditionals on -Wmaybe-uninitialized pragmas. 2015-10-27 23:42:20 +00:00
ldbl2mpn.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
lgamma_negl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
lgamma_product.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
lgamma_productl.c Merge common usage of mul_split function 2016-08-19 11:29:43 -05:00
Makefile Add canonicalize, canonicalizef, canonicalizel. 2016-10-26 23:14:31 +00:00
math_ldbl.h
mpn2ldbl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
printf_fphex.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_asinhl.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
s_cbrtl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_copysignl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_cosl.c Implement ldbl-96 sinl / cosl / sincosl (bug 13851). 2012-03-16 12:30:05 +00:00
s_erfl.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
s_fma.c Call math_opt_barrier inside if 2016-01-15 05:23:20 -08:00
s_fmal.c Call math_opt_barrier inside if 2016-01-15 05:23:20 -08:00
s_frexpl.c Fix frexp (NaN) (bug 20250). 2016-06-13 17:27:19 +00:00
s_getpayloadl.c Add getpayload, getpayloadf, getpayloadl. 2016-10-19 01:49:09 +00:00
s_iscanonicall.c Add canonicalize, canonicalizef, canonicalizel. 2016-10-26 23:14:31 +00:00
s_issignalingl.c Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1. 2016-10-17 22:48:51 +00:00
s_llrintl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_llroundl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_lrintl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_lroundl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_modfl.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_nexttoward.c Make nextafter, nexttoward set errno (bug 6799). 2015-11-02 18:54:19 +00:00
s_nexttowardf.c Make nextafter, nexttoward set errno (bug 6799). 2015-11-02 18:54:19 +00:00
s_nextupl.c Add nextup and nextdown math functions 2016-06-16 21:37:45 +05:30
s_remquol.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_roundl.c Do not raise "inexact" from generic round (bug 15479). 2016-05-24 17:46:55 +00:00
s_scalblnl.c Fix ldbl-96 scalblnl underflowing results (bug 17803). 2015-01-12 23:02:14 +00:00
s_setpayloadl_main.c Add setpayload, setpayloadf, setpayloadl. 2016-11-19 00:16:28 +00:00
s_setpayloadl.c Add setpayload, setpayloadf, setpayloadl. 2016-11-19 00:16:28 +00:00
s_setpayloadsigl.c Add setpayloadsig, setpayloadsigf, setpayloadsigl. 2016-11-24 23:56:48 +00:00
s_signbitl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_sincosl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s_sinl.c Implement ldbl-96 sinl / cosl / sincosl (bug 13851). 2012-03-16 12:30:05 +00:00
s_tanhl.c Refactor code forcing underflow exceptions. 2015-09-23 22:42:30 +00:00
s_tanl.c Fix tan, tanl for large inputs. 2012-03-16 20:05:37 +00:00
s_totalorderl.c Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1. 2016-10-17 22:48:51 +00:00
s_totalordermagl.c Define HIGH_ORDER_BIT_IS_SET_FOR_SNAN to 0 or 1. 2016-10-17 22:48:51 +00:00
strtod_nan_ldouble.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strtold_l.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
t_sincosl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
test-canonical-ldbl-96.c Add canonicalize, canonicalizef, canonicalizel. 2016-10-26 23:14:31 +00:00
test-totalorderl-ldbl-96.c Add totalordermag, totalordermagf, totalordermagl. 2016-10-15 00:36:48 +00:00
w_expl.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
x2y2m1.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
x2y2m1l.c Merge common usage of mul_split function 2016-08-19 11:29:43 -05:00