aboutsummaryrefslogtreecommitdiff
path: root/libatomic/Makefile.am
diff options
context:
space:
mode:
authorWilco Dijkstra <wilco.dijkstra@arm.com>2022-11-15 14:38:55 +0000
committerWilco Dijkstra <wilco.dijkstra@arm.com>2022-11-15 15:08:33 +0000
commitd1288d850944f69a795e4ff444a427eba3fec11b (patch)
tree0357dd0e95cb2e1825217396f7ff76fe6b1a377b /libatomic/Makefile.am
parent5925f0ec54ab5ed773935eec09a602f58fa0ca2c (diff)
downloadgcc-d1288d850944f69a795e4ff444a427eba3fec11b.zip
gcc-d1288d850944f69a795e4ff444a427eba3fec11b.tar.gz
gcc-d1288d850944f69a795e4ff444a427eba3fec11b.tar.bz2
libatomic: Add support for LSE and LSE2
Add support for AArch64 LSE and LSE2 to libatomic. Disable outline atomics, and use LSE ifuncs for 1-8 byte atomics and LSE2 ifuncs for 16-byte atomics. On Neoverse V1, 16-byte atomics are ~4x faster due to avoiding locks. Note this is safe since we swap all 16-byte atomics using the same ifunc, so they either use locks or LSE2 atomics, but never a mix. This also improves ABI compatibility with LLVM: its inlined 16-byte atomics are compatible with the new libatomic if LSE2 is supported. libatomic/ * Makefile.in: Regenerated with automake 1.15.1. * Makefile.am: Add atomic_16.S for AArch64. * configure.tgt: Disable outline atomics in AArch64 build. * config/linux/aarch64/atomic_16.S: New file - implementation of ifuncs for 16-byte atomics. * config/linux/aarch64/host-config.h: Enable ifuncs, use LSE (HWCAP_ATOMICS) for 1-8-byte atomics and LSE2 (HWCAP_USCAT) for 16-byte atomics.
Diffstat (limited to 'libatomic/Makefile.am')
-rw-r--r--libatomic/Makefile.am2
1 files changed, 2 insertions, 0 deletions
diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
index d88515e..41e5da2 100644
--- a/libatomic/Makefile.am
+++ b/libatomic/Makefile.am
@@ -127,6 +127,8 @@ if HAVE_IFUNC
if ARCH_AARCH64_LINUX
IFUNC_OPTIONS = -march=armv8-a+lse
libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS)))
+libatomic_la_SOURCES += atomic_16.S
+
endif
if ARCH_ARM_LINUX
IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64