glibc/sysdeps/unix/sysv/linux/powerpc
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
..
bits Define PTHREAD_STACK_MIN to sysconf(_SC_THREAD_STACK_MIN) 2021-07-09 15:10:35 -07:00
powerpc32 Add narrowing square root functions 2021-09-10 20:56:22 +00:00
powerpc64 Add narrowing square root functions 2021-09-10 20:56:22 +00:00
sys Add PTRACE_GET_RSEQ_CONFIGURATION from Linux 5.13 to sys/ptrace.h 2021-08-09 16:51:38 +00:00
configure powerpc: Use --no-tls-get-addr-optimize in test only if the linker supports it 2021-08-24 09:26:44 -07:00
configure.ac powerpc: Use --no-tls-get-addr-optimize in test only if the linker supports it 2021-08-24 09:26:44 -07:00
dl-auxv.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-cache.h Update. 2003-06-25 08:19:44 +00:00
elision-conf.c nptl: Move elision implementations into libc 2021-02-23 14:59:34 +01:00
elision-conf.h nptl: Move elision implementations into libc 2021-02-23 14:59:34 +01:00
elision-lock.c nptl: Move elision implementations into libc 2021-02-23 14:59:34 +01:00
elision-timed.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
elision-trylock.c nptl: Move elision implementations into libc 2021-02-23 14:59:34 +01:00
elision-unlock.c nptl: Move elision implementations into libc 2021-02-23 14:59:34 +01:00
get_timebase_freq.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gettimeofday.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
htm.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
ioctl.c misc: Add time64 alias for ioctl 2021-07-21 11:58:09 +02:00
ipc_priv.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
kernel_sigaction.h m68k: Fix sigaction kernel definition (BZ #23960) 2018-12-18 16:45:10 -02:00
kernel_termios.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
kernel-features.h linux: Consolidate Linux setsockopt implementation 2021-07-06 11:45:35 -03:00
ldconfig.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldd-rewrite.sed Update. 2002-09-05 10:28:51 +00:00
libc-start.c Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
libc-start.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-vdso.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libpthread-compat.c nptl: Move pthread_attr_setstacksize into libc 2021-05-11 19:33:20 +02:00
Makefile powerpc: Use --no-tls-get-addr-optimize in test only if the linker supports it 2021-08-24 09:26:44 -07:00
nldbl-abi.h 2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> 2006-01-28 00:15:15 +00:00
pthread_attr_setstack.c PowerPC: Move remaining nptl/sysdeps/unix/sysv/linux/powerpc/ files. 2014-05-26 11:45:14 -05:00
pthread_attr_setstacksize.c PowerPC: Move remaining nptl/sysdeps/unix/sysv/linux/powerpc/ files. 2014-05-26 11:45:14 -05:00
readelflib.c ldconfig/x86: Store ISA level in cache and aux cache 2021-01-13 05:51:17 -08:00
rt-sysdep.c Update. 2004-04-19 06:19:34 +00:00
rtld_static_init.h powerpc: Remove _dl_var_init 2021-05-17 10:08:17 +02:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
socket-constants-time64.h linux: Add fallback for 64-bit time_t SO_TIMESTAMP{NS} 2021-06-15 10:42:06 -03:00
struct_kernel_shmid64_ds.h sysv: linux: Add 64-bit time_t variant for shmctl 2020-07-09 12:05:47 -03:00
syscall.S Add build option to disable usage of scv on powerpc 2021-06-10 16:23:25 -03:00
sysconf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.h Add build option to disable usage of scv on powerpc 2021-06-10 16:23:25 -03:00
test-gettimebasefreq-static.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-gettimebasefreq.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-powerpc-linux-sysconf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
time.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions Add missing symbols to Version files 2021-06-02 07:32:19 +02:00
xstatver.h Remove mknod wrapper functions, move them to symbols 2020-10-09 17:02:06 -03:00