mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 07:10:06 +00:00
4b7d1efb51
Fully supporting TS 18661-3 _FloatN / _FloatNx types in the cases where they have the same format as other supported types (in line with the principles described at <https://sourceware.org/ml/libc-alpha/2017-01/msg00333.html>) means adding a lot of function aliases to libm (and a few to libc). float functions will have *f32 aliases, double functions will have *f32x and *f64 aliases, long double functions may have *f64x, *f128 or both aliases depending on the configuration, float128 functions have have *f64x aliases depending on the configuration. At present, most individual libm functions have their own weak_alias calls to define the public names for those functions. For TS 18661-3 support, it is desirable that functions not all need to duplicate the logic for which alias names to define. Thus, common macros for defining the public aliases to a libm function make sense. In the double and long double cases, such macros will also help simplify existing code (with LONG_DOUBLE_COMPAT etc. conditionals), by eliminating existing conditionals and ldbl-opt / ldbl-64-128 wrappers (using the generated ldbl-compat-choose.h to allow a single macro definition to expand appropriately for each symbol depending on LONG_DOUBLE_COMPAT for that symbol). This patch starts the process of adding such macros with a straightforward case: a libm_alias_float macro, initially only used in the case of type-generic templates, to define aliases for float functions (currently just the *f public names, in future also *f32). Future patches are intended to add such macros for other types and to extend the cases in which they are used, with a view to as many places as possible using them before support for _FloatN / _FloatNx aliases is enabled. (I think it's inevitable that some places doing architecture-specific things with aliases and symbol versioning may end up needing to replicate logic for the new aliases, but hopefully the number of such places can be kept to a minimum.) The libm_alias_float macro takes unsuffixed names for both the internal and public function names. The need for unsuffixed public names is obvious, since such macros will end up defining multiple public names with different suffixes. Unsuffixed internal names are because I expect the ldbl-128 functions to end up in a form that always defines *f128 names and sometimes also defines *l names - with the main internal names being e.g. __ieee754_<func>f128 (so many macros in float128_private.h can go away). But __ieee754_<func>l aliases will still be needed for e.g. use from math/ complex functions, meaning the alias macro needs to see just __ieee754_<func> as internal name so it can create an alias based on that name. Since libm_alias_float128 will thus need the unsuffixed internal name, it seems to make sense for all such macros to receive the unsuffixed name. Tested for x86_64. Also tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * sysdeps/generic/libm-alias-float.h: New file. * sysdeps/generic/math-type-macros-float.h: Include <libm-alias-float.h>. [!declare_mgen_alias] (declare_mgen_alias): Define macro. |
||
---|---|---|
argp | ||
assert | ||
benchtests | ||
bits | ||
catgets | ||
ChangeLog.old | ||
conform | ||
crypt | ||
csu | ||
ctype | ||
debug | ||
dev | ||
dirent | ||
dlfcn | ||
elf | ||
gmon | ||
gnulib | ||
grp | ||
gshadow | ||
hesiod | ||
hurd | ||
iconv | ||
iconvdata | ||
include | ||
inet | ||
intl | ||
io | ||
libidn | ||
libio | ||
locale | ||
localedata | ||
login | ||
mach | ||
malloc | ||
manual | ||
math | ||
mathvec | ||
misc | ||
nis | ||
nptl | ||
nptl_db | ||
nscd | ||
nss | ||
po | ||
posix | ||
pwd | ||
resolv | ||
resource | ||
rt | ||
scripts | ||
setjmp | ||
shadow | ||
signal | ||
socket | ||
soft-fp | ||
stdio-common | ||
stdlib | ||
streams | ||
string | ||
sunrpc | ||
support | ||
sysdeps | ||
sysvipc | ||
termios | ||
time | ||
timezone | ||
wcsmbs | ||
wctype | ||
.gitattributes | ||
.gitignore | ||
abi-tags | ||
aclocal.m4 | ||
ChangeLog | ||
config.h.in | ||
config.make.in | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
extra-lib.mk | ||
gen-locales.mk | ||
INSTALL | ||
libc-abis | ||
libof-iterator.mk | ||
LICENSES | ||
MAINTAINERS | ||
Makeconfig | ||
Makefile | ||
Makefile.in | ||
Makerules | ||
NEWS | ||
o-iterator.mk | ||
README | ||
Rules | ||
shlib-versions | ||
test-skeleton.c | ||
version.h |
This directory contains the sources of the GNU C Library. See the file "version.h" for what release version you have. The GNU C Library is the standard system C library for all GNU systems, and is an important part of what makes up a GNU system. It provides the system API for all programs written in C and C-compatible languages such as C++ and Objective C; the runtime facilities of other programming languages use the C library to access the underlying operating system. In GNU/Linux systems, the C library works with the Linux kernel to implement the operating system behavior seen by user applications. In GNU/Hurd systems, it works with a microkernel and Hurd servers. The GNU C Library implements much of the POSIX.1 functionality in the GNU/Hurd system, using configurations i[4567]86-*-gnu. The current GNU/Hurd support requires out-of-tree patches that will eventually be incorporated into an official GNU C Library release. When working with Linux kernels, this version of the GNU C Library requires Linux kernel version 3.2 or later. Also note that the shared version of the libgcc_s library must be installed for the pthread library to work correctly. The GNU C Library supports these configurations for using Linux kernels: aarch64*-*-linux-gnu alpha*-*-linux-gnu arm-*-linux-gnueabi hppa-*-linux-gnu Not currently functional without patches. i[4567]86-*-linux-gnu x86_64-*-linux-gnu Can build either x86_64 or x32 ia64-*-linux-gnu m68k-*-linux-gnu microblaze*-*-linux-gnu mips-*-linux-gnu mips64-*-linux-gnu powerpc-*-linux-gnu Hardware or software floating point, BE only. powerpc64*-*-linux-gnu Big-endian and little-endian. s390-*-linux-gnu s390x-*-linux-gnu sh[34]-*-linux-gnu sparc*-*-linux-gnu sparc64*-*-linux-gnu tilegx-*-linux-gnu tilepro-*-linux-gnu If you are interested in doing a port, please contact the glibc maintainers; see http://www.gnu.org/software/libc/ for more information. See the file INSTALL to find out how to configure, build, and install the GNU C Library. You might also consider reading the WWW pages for the C library at http://www.gnu.org/software/libc/. The GNU C Library is (almost) completely documented by the Texinfo manual found in the `manual/' subdirectory. The manual is still being updated and contains some known errors and omissions; we regret that we do not have the resources to work on the manual as much as we would like. For corrections to the manual, please file a bug in the `manual' component, following the bug-reporting instructions below. Please be sure to check the manual in the current development sources to see if your problem has already been corrected. Please see http://www.gnu.org/software/libc/bugs.html for bug reporting information. We are now using the Bugzilla system to track all bug reports. This web page gives detailed information on how to report bugs properly. The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.