glibc/sysdeps
Szabolcs Nagy 718d6542f2 Remove the error handling wrapper from log2
Introduce new log2 symbol version that doesn't do SVID compatible error
handling.  The standard errno and fp exception based error handling is
inline in the new code and does not have significant overhead.

The wrapper is disabled for sysdeps/ieee754/dbl-64 by using empty
w_log2.c and enabled for targets with their own log2 implementation by
including math/w_log2.c.

The compatibility symbol version still uses the wrapper with SVID error
handling around the new code.  There is no new symbol version nor
compatibility code on !LIBM_SVID_COMPAT targets (e.g. riscv).

On targets where previously log2l was an alias of log2, now it points to
the compatibility symbol with the wrapper, because it still need the
SVID compatible error handling.  This affects NO_LONG_DOUBLE (e.g. arm)
and LONG_DOUBLE_COMPAT (e.g. alpha) targets as well.

The __log2_finite symbol is now an alias of log2.  Both __log2_finite
and log2 set errno and thus not const functions.

The ia64 asm is changed so the compat and new symbol versions map to the
same address.

Tested with build-many-glibcs.py.

	* math/Versions (GLIBC_2.29): Add log2.
	* math/w_log2_compat.c (__log2_compat): Change to versioned compat
	symbol.
	* math/w_log2.c: New file.
	* sysdeps/i386/fpu/w_log2.c: New file.
	* sysdeps/ia64/fpu/e_log2.S: Add versioned symbols.
	* sysdeps/ieee754/dbl-64/e_log2.c (__ieee754_log2): Rename to __log2
	and add necessary aliases.
	* sysdeps/ieee754/dbl-64/w_log2.c: New file.
	* sysdeps/m68k/m680x0/fpu/w_log2.c: New file.
	* sysdeps/mach/hurd/i386/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/alpha/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/arm/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/hppa/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/i386/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/ia64/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/nios2/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Update.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/sh/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Update.
2018-11-21 09:57:21 +00:00
..
aarch64 [AArch64] Adjust writeback in non-zero memset 2018-11-20 12:37:00 +00:00
alpha Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
arm Fix armv7 build with GCC 9. 2018-11-12 23:59:29 +00:00
generic libio: Flush stream at freopen (BZ#21037) 2018-10-02 10:01:56 -03:00
gnu hurd: Fix build 2018-10-31 09:17:05 +01:00
hppa Move SNAN_TESTS_PRESERVE_PAYLOAD out of math-tests.h. 2018-08-01 11:21:16 +00:00
htl hurd: Avoid PLTs for __pthread_get/setspecific 2018-08-09 01:28:55 +02:00
hurd Fix ISO C threads installed header and HURD assumption 2018-07-25 17:27:45 -03:00
i386 Remove the error handling wrapper from log2 2018-11-21 09:57:21 +00:00
ia64 Remove the error handling wrapper from log2 2018-11-21 09:57:21 +00:00
ieee754 Remove the error handling wrapper from log2 2018-11-21 09:57:21 +00:00
init_array sysdeps/init_array: Add PREINIT_FUNCTION to crti.S 2018-01-29 10:22:26 -08:00
m68k Remove the error handling wrapper from log2 2018-11-21 09:57:21 +00:00
mach Remove the error handling wrapper from log2 2018-11-21 09:57:21 +00:00
microblaze Mark _init and _fini as hidden [BZ #23145] 2018-06-08 10:28:52 -07:00
mips Fix mips build with GCC 9. 2018-11-13 01:55:15 +00:00
nios2 Move EXCEPTION_TESTS_* out of math-tests.h 2018-08-23 23:41:13 +00:00
nptl Fix race in pthread_mutex_lock while promoting to PTHREAD_MUTEX_ELISION_NP [BZ #23275] 2018-10-17 12:23:04 +02:00
posix posix: New function posix_spawn_file_actions_addchdir_np [BZ #17405] 2018-11-06 16:08:12 +01:00
powerpc Add hidden_tls_def macros, fix powerpc-soft build with GCC 9. 2018-11-13 01:53:53 +00:00
pthread hurd: fix sigevent's sigev_notify_attributes field type 2018-04-19 21:43:44 +02:00
riscv RISC-V: properly terminate call chain (bug 23125) 2018-10-30 12:07:25 +01:00
s390 S390: Regenerate ULPs. 2018-09-06 14:29:01 +02:00
sh Update SH libm-tests-ulps 2018-07-31 10:33:53 -03:00
sparc Fix sparc64 build with GCC 9. 2018-11-13 00:27:06 +00:00
unix Remove the error handling wrapper from log2 2018-11-21 09:57:21 +00:00
wordsize-32 Use libc_hidden_* for strtoumax (bug 15105). 2018-02-28 14:16:21 +00:00
wordsize-64 Don't reduce test timeout to less than default 2018-10-17 09:34:13 +02:00
x86 Check multiple NT_GNU_PROPERTY_TYPE_0 notes [BZ #23509] 2018-11-08 10:07:10 -08:00
x86_64 Remove the error handling wrapper from log 2018-11-21 09:56:27 +00:00