glibc/sysdeps/unix/sysv/linux/x86_64
Joseph Myers abd383584b Add narrowing square root functions
This patch adds the narrowing square root functions from TS 18661-1 /
TS 18661-3 / C2X to glibc's libm: fsqrt, fsqrtl, dsqrtl, f32sqrtf64,
f32sqrtf32x, f32xsqrtf64 for all configurations; f32sqrtf64x,
f32sqrtf128, f64sqrtf64x, f64sqrtf128, f32xsqrtf64x, f32xsqrtf128,
f64xsqrtf128 for configurations with _Float64x and _Float128;
__f32sqrtieee128 and __f64sqrtieee128 aliases in the powerpc64le case
(for calls to fsqrtl and dsqrtl when long double is IEEE binary128).
Corresponding tgmath.h macro support is also added.

The changes are mostly similar to those for the other narrowing
functions previously added, so the description of those generally
applies to this patch as well.  However, the not-actually-narrowing
cases (where the two types involved in the function have the same
floating-point format) are aliased to sqrt, sqrtl or sqrtf128 rather
than needing a separately built not-actually-narrowing function such
as was needed for add / sub / mul / div.  Thus, there is no
__nldbl_dsqrtl name for ldbl-opt because no such name was needed
(whereas the other functions needed such a name since the only other
name for that entry point was e.g. f32xaddf64, not reserved by TS
18661-1); the headers are made to arrange for sqrt to be called in
that case instead.

The DIAG_* calls in sysdeps/ieee754/soft-fp/s_dsqrtl.c are because
they were observed to be needed in GCC 7 testing of
riscv32-linux-gnu-rv32imac-ilp32.  The other sysdeps/ieee754/soft-fp/
files added didn't need such DIAG_* in any configuration I tested with
build-many-glibcs.py, but if they do turn out to be needed in more
files with some other configuration / GCC version, they can always be
added there.

I reused the same test inputs in auto-libm-test-in as for
non-narrowing sqrt rather than adding extra or separate inputs for
narrowing sqrt.  The tests in libm-test-narrow-sqrt.inc also follow
those for non-narrowing sqrt.

Tested as followed: natively with the full glibc testsuite for x86_64
(GCC 11, 7, 6) and x86 (GCC 11); with build-many-glibcs.py with GCC
11, 7 and 6; cross testing of math/ tests for powerpc64le, powerpc32
hard float, mips64 (all three ABIs, both hard and soft float).  The
different GCC versions are to cover the different cases in tgmath.h
and tgmath.h tests properly (GCC 6 has _Float* only as typedefs in
glibc headers, GCC 7 has proper _Float* support, GCC 8 adds
__builtin_tgmath).
2021-09-10 20:56:22 +00:00
..
64 Add narrowing square root functions 2021-09-10 20:56:22 +00:00
x32 Add narrowing square root functions 2021-09-10 20:56:22 +00:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
__start_context.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
clone3.S x86-64: Add the clone3 wrapper 2021-07-14 06:34:13 -07:00
clone.S x86-64: Align child stack to 16 bytes [BZ #27902] 2021-05-31 12:03:36 -07: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 2021-01-02 12:17:34 -08:00
dl-procinfo.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
dl-procinfo.h x86: Set dl_platform and dl_hwcap from CPU features [BZ #21391] 2017-05-03 13:44:35 -07:00
getcontext.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
kernel-features.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldconfig.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldd-rewrite.sed Add x32 support to ldd-rewrite.sed 2012-03-19 15:18:44 -07:00
libc_sigaction.c signal: Add __libc_sigaction 2021-03-18 15:54:39 -03:00
libmvec.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
makecontext.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Makefile ldconfig/x86: Store ISA level in cache and aux cache 2021-01-13 05:51:17 -08:00
register-dump.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
setcontext.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
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 2021-01-02 12:17:34 -08:00
swapcontext.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
syscall.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
syscalls.list linux: Consolidate Linux setsockopt implementation 2021-07-06 11:45:35 -03:00
sysdep.h Typo: Rename HAVE_CLONE3_WAPPER to HAVE_CLONE3_WRAPPER 2021-07-28 10:19:08 -07:00
sysdep.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-glibc-hwcaps-2.c x86-64: Update tst-glibc-hwcaps-2.c for x86-64 baseline 2021-01-22 09:37:44 -08:00
ucontext_i.sym x86-64/CET: Extend ucontext_t to save shadow stack 2018-07-25 06:37:31 -07:00
Versions Linux: Move timer_settime, __timer_settime64 from librt to libc 2021-06-28 09:51:01 +02:00
vfork.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x86-64-isa-level-VALUE.c ldconfig/x86: Store ISA level in cache and aux cache 2021-01-13 05:51:17 -08:00