glibc/sysdeps/ia64
Gabriel F. T. Gomes 8466ee1cb7 float128: Add signbit alternative for old compilers
In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*,
e.g.: __builtin_signbitf128, before GCC 6.  However, there has never
been a __builtin_signbitf128 in GCC and the type-generic builtin is
only available since GCC 6.  For older GCC, this patch defines
__builtin_signbitf128 to __signbitf128, so that the internal function
is used instead of the non-existent builtin.

This patch also changes the implementation of __signbitf128, because
it was reusing the implementation of __signbitl from ldbl-128, which
calls __builtin_signbitl.  Using the long double version of the
builtin is not correct on machines where _Float128 is ABI-distinct
from long double (i.e.: ia64, powerpc64le, x86, x86_84).  The new
implementation does not rely on builtins when being built with GCC
versions older than 6.0.

The new code does not currently affect powerpc64le builds, because
only GCC 6.2 fulfills the requirements from configure.  It might
affect powerpc64le builds if those requirements are backported to
older versions of the compiler.  The new code affects x86_64 builds,
since glibc is supposed to build correctly with older versions of GCC.

Tested for powerpc64le and x86_64.

	* include/math.h (__signbitf128): Define as hidden.
	* sysdeps/ieee754/float128/s_signbitf128.c (__signbitf128):
	Reimplement without builtins.
	* sysdeps/ia64/bits/floatn.h [!__GNUC_PREREQ (6, 0)]
	(__builtin_signbitf128): Define to __signbitf128.
	* sysdeps/powerpc/bits/floatn.h: Likewise.
	* sysdeps/x86/bits/floatn.h: Likewise.
2017-06-30 18:34:29 -03:00
..
bits float128: Add signbit alternative for old compilers 2017-06-30 18:34:29 -03:00
fpu Add float128 support for ia64. 2017-06-26 22:50:45 +00:00
nptl
_mcount.S
abort-instr.h
atomic-machine.h Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
backtrace.c
bcopy.S
bzero.S
configure
configure.ac
crti.S
crtn.S
dl-dtprocnum.h
dl-fptr.h
dl-lookupcfg.h
dl-machine.h PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY 2017-06-14 10:47:25 +09:30
dl-sysdep.h
dl-tls.h
dl-trampoline.S
entry.h
float128-abi.h Add float128 support for ia64. 2017-06-26 22:50:45 +00:00
gccframe.h
hp-timing.h
htonl.S
htons.S
ia64libgcc.S
ieee754.h
Implies Add float128 support for ia64. 2017-06-26 22:50:45 +00:00
jmpbuf-unwind.h
ldbl2mpn.c
ldsodefs.h
libc-tls.c
linkmap.h
machine-gmon.h
Makeconfig
Makefile Add float128 support for ia64. 2017-06-26 22:50:45 +00:00
math-tests.h Add float128 support for ia64. 2017-06-26 22:50:45 +00:00
memccpy.S
memchr.S
memcmp.S
memcpy.S
memmove.S
memset.S
memusage.h
sched_cpucount.c
softpipe.h
sotruss-lib.c
stackguard-macros.h
stackinfo.h
start.S
strchr.S
strcmp.S
strcpy.S
strlen.S
strncmp.S
strncpy.S
sysdep.h
tininess.h
tls-macros.h
tst-audit.h
Versions