glibc/sysdeps
Szabolcs Nagy 2b802d55b7 aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT
This enables searching shared libraries in atomics/ when the hardware
supports LSE atomics of armv8.1 so one can provide optimized variants
of libraries in a portable way.

LSE atomics does not affect library abi, the new instructions can
interoperate with old ones.

I considered the earlier comments on the patch

https://sourceware.org/ml/libc-alpha/2018-04/msg00400.html
https://sourceware.org/ml/libc-alpha/2018-04/msg00625.html

It turns out that the way glibc dynamic linker decides on the search
path is not very flexible: it wants to use hwcap bits and associated
strings.  So some targets reuse hwcap bits for glibc internal purposes
to affect the search logic.  But hwcap is an interface with the kernel,
glibc should not allocate bits in it for its internal logic as that
limits future hwcap extensions and confusing to users who expect to see
hwcap bits in ifunc resolvers.  Instead of rewriting the dynamic linker
path logic (which affects all targets) this patch just uses the existing
mechanism, however this means that the path name has to be the hwcap
name "atomics" and cannot be changed to something more meaningful to
users.

It is hard to tell how much performance benefit this can give, in
principle armv8.1 atomics can be better optimized in the hardware, so it
can make a difference for synchronization heavy code.  On some systems
such multilib setup may be the only viable way to get optimized
libraries used.

	* sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (HWCAP_IMPORTANT): Add
	HWCAP_ATOMICS.

(cherry picked from commit 397c54c1af)
2020-03-25 18:00:22 +00:00
..
aarch64 [AArch64] Add ifunc support for Ares 2019-09-06 18:58:34 +01:00
alpha nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 11:03:01 -02:00
arm nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 11:03:01 -02:00
generic posix: Fix large mmap64 offset for mips64n32 (BZ#24699) 2019-07-12 19:02:04 +00:00
gnu utmp: Avoid -Wstringop-truncation warning 2018-10-22 14:00:13 +02:00
hppa nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 11:03:01 -02:00
i386 Fix i386 memmove issue (bug 22644). 2018-05-17 13:58:22 +02:00
ia64 ia64: Fix memchr for large input sizes (BZ #22603) 2018-01-10 21:56:05 +01:00
ieee754 Remove conditional on LDBL_MANT_DIG from e_lgammal_r.c 2017-10-10 10:15:16 -03:00
init_array Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
m68k nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 11:03:01 -02:00
mach Remove __need macros from errno.h (__need_Emath, __need_error_t). 2017-06-14 08:14:34 -04:00
microblaze nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 11:03:01 -02:00
mips nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 11:03:01 -02:00
nios2 nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 11:03:01 -02:00
nptl Fix blocking pthread_join. [BZ #23137] 2018-05-17 14:05:51 +02:00
posix preadv2/pwritev2: Handle offset == -1 [BZ #22753] 2018-09-28 15:16:02 -03:00
powerpc Fix array overflow in backtrace on PowerPC (bug 25423) 2020-03-20 15:32:44 -03:00
pthread Single threaded stdio optimization 2017-07-04 16:05:12 +01:00
s390 nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 11:03:01 -02:00
sh nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 11:03:01 -02:00
sparc Fix TLS relocations against local symbols on powerpc32, sparc32 and sparc64 2017-11-14 21:07:52 +01:00
tile nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 11:03:01 -02:00
unix aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT 2020-03-25 18:00:22 +00:00
wordsize-32 Build divdi3 only for architecture that required it 2017-04-06 15:14:34 -03:00
wordsize-64 posix: Consolidate Linux glob implementation 2017-10-30 11:49:40 +01:00
x86 x86: Fix Haswell CPU string flags (BZ#23709) 2018-11-02 11:14:05 +01:00
x86_64 x86-64 memcmp: Use unsigned Jcc instructions on size [BZ #24155] 2019-02-04 10:27:37 -08:00