glibc/sysdeps/alpha
Joseph Myers 0acb8a2a85 Refactor long double information into bits/long-double.h.
Information about whether the ABI of long double is the same as that
of double is split between bits/mathdef.h and bits/wordsize.h.

When the ABIs are the same, bits/mathdef.h defines
__NO_LONG_DOUBLE_MATH.  In addition, in the case where the same glibc
binary supports both -mlong-double-64 and -mlong-double-128,
bits/wordsize.h defines __LONG_DOUBLE_MATH_OPTIONAL, along with
__NO_LONG_DOUBLE_MATH if this particular compilation is with
-mlong-double-64.

As part of the refactoring I proposed in
<https://sourceware.org/ml/libc-alpha/2016-11/msg00745.html>, this
patch puts all that information in a single header,
bits/long-double.h.  It is included from sys/cdefs.h alongside the
include of bits/wordsize.h, so other headers generally do not need to
include bits/long-double.h directly.

Previously, various bits/mathdef.h headers and bits/wordsize.h headers
had this long double information (including implicitly in some
bits/mathdef.h headers through not having the defines present in the
default version).  After the patch, it's all in six bits/long-double.h
headers.  Furthermore, most of those new headers are not
architecture-specific.  Architectures with optional long double all
use the ldbl-opt sysdeps directory, either in the order (ldbl-64-128,
ldbl-opt, ldbl-128) or (ldbl-128ibm, ldbl-opt).  Thus a generic header
for the case where long double = double, and headers in ldbl-128,
ldbl-96 and ldbl-opt, suffices to cover every architecture except for
cases where long double properties vary between different ABIs sharing
a set of installed headers; fortunately all the ldbl-opt cases share a
single compiler-predefined macro __LONG_DOUBLE_128__ that can be used
to tell whether this compilation is -mlong-double-64 or
-mlong-double-128.

The two cases where a set of headers is shared between ABIs with
different long double properties, MIPS (o32 has long double = double,
other ABIs use ldbl-128) and SPARC (32-bit has optional long double,
64-bit has required long double), need their own bits/long-double.h
headers.

As with bits/wordsize.h, multiple-include protection for this header
is generally implicit through the include guards on sys/cdefs.h, and
multiple inclusion is harmless in any case.  There is one subtlety:
the header must not define __LONG_DOUBLE_MATH_OPTIONAL if
__NO_LONG_DOUBLE_MATH was defined before its inclusion, because doing
so breaks how sysdeps/ieee754/ldbl-opt/nldbl-compat.h defines
__NO_LONG_DOUBLE_MATH itself before including system headers.  Subject
to keeping that working, it would be reasonable to move these macros
from defined/undefined #ifdef to always-defined 1/0 #if semantics, but
this patch does not attempt to do so, just rearranges where the macros
are defined.

After this patch, the only use of bits/mathdef.h is the alpha one for
modifying complex function ABIs for old GCC.  Thus, all versions of
the header other than the default and alpha versions are removed, as
is the include from math.h.

Tested for x86_64 and x86.  Also did compilation-only testing with
build-many-glibcs.py.

	* bits/long-double.h: New file.
	* sysdeps/ieee754/ldbl-128/bits/long-double.h: Likewise.
	* sysdeps/ieee754/ldbl-96/bits/long-double.h: Likewise.
	* sysdeps/ieee754/ldbl-opt/bits/long-double.h: Likewise.
	* sysdeps/mips/bits/long-double.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/long-double.h: Likewise.
	* math/Makefile (headers): Add bits/long-double.h.
	* misc/sys/cdefs.h: Include <bits/long-double.h>.
	* stdlib/strtold.c: Include <bits/long-double.h> instead of
	<bits/wordsize.h>.
	* bits/mathdef.h [!_COMPLEX_H]: Do not allow inclusion.
	[!__NO_LONG_DOUBLE_MATH]: Remove conditional code.
	* math/math.h: Do not include <bits/mathdef.h>.
	* sysdeps/aarch64/bits/mathdef.h: Remove file.
	* sysdeps/alpha/bits/mathdef.h [!_COMPLEX_H]: Do not allow
	inclusion.
	* sysdeps/ia64/bits/mathdef.h: Remove file.
	* sysdeps/m68k/m680x0/bits/mathdef.h: Likewise.
	* sysdeps/mips/bits/mathdef.h: Likewise.
	* sysdeps/powerpc/bits/mathdef.h: Likewise.
	* sysdeps/s390/bits/mathdef.h: Likewise.
	* sysdeps/sparc/bits/mathdef.h: Likewise.
	* sysdeps/x86/bits/mathdef.h: Likewise.
	* sysdeps/s390/s390-32/bits/wordsize.h
	[!__NO_LONG_DOUBLE_MATH && !__LONG_DOUBLE_MATH_OPTIONAL]: Remove
	conditional code.
	* sysdeps/s390/s390-64/bits/wordsize.h
	[!__NO_LONG_DOUBLE_MATH && !__LONG_DOUBLE_MATH_OPTIONAL]:
	Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/wordsize.h
	[!__NO_LONG_DOUBLE_MATH && !__LONG_DOUBLE_MATH_OPTIONAL]:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h
	[!__NO_LONG_DOUBLE_MATH && !__LONG_DOUBLE_MATH_OPTIONAL]:
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/wordsize.h
	[!__NO_LONG_DOUBLE_MATH && !__LONG_DOUBLE_MATH_OPTIONAL]:
	Likewise.
2016-12-14 18:27:56 +00:00
..
alphaev5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
alphaev6 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
alphaev67 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
bits Refactor long double information into bits/long-double.h. 2016-12-14 18:27:56 +00:00
fpu Fix alpha sqrt fegetenv namespace (bug 20768). 2016-11-04 17:19:13 +00:00
nptl Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
soft-fp Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
_mcount.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
add_n.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
atomic-machine.h Remove atomic_compare_and_exchange_bool_rel. 2016-06-24 23:04:40 +03:00
backtrace.c
bb_init_func.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
bsd-_setjmp.S
bsd-setjmp.S
bzero.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
configure
configure.ac
crti.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
div_libc.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
div.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
divl.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
divlu.S
divq.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
divqu.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-dtprocnum.h
dl-machine.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-procinfo.c 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
dl-tls.h elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ffs.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ffsll.S
gccframe.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
hp-timing.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
htonl.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
htons.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Implies
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ldiv.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libc-tls.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
lldiv.S
lshift.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Makefile Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memchr.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memset.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
mul_1.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
nscd-types.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
preconfigure
rawmemchr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
reml.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
remlu.S
remq.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
remqu.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
rshift.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setjmp.S Add missing hidden_def (__sigsetjmp). 2016-12-01 20:49:25 +00:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
stpcpy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
stpncpy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strcat.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strcmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strcpy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strncat.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strncmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strncpy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strrchr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
stxcpy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
stxncpy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Subdirs
submul_1.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tininess.h
tls-macros.h
tst-audit.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
udiv_qrnnd.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Versions