gcc/libatomic
Victor Do Nascimento 7dd4466b39 Libatomic: Add checks in ifunc selectors for LSE/LSE2 requirements.
At present, Evaluation of both `has_lse2(hwcap)' and
`has_lse128(hwcap)' may require issuing an `mrs' instruction to query
a system register.  This instruction, when issued from user-space
results in a trap by the kernel which then returns the value read in
by the system register.  Given the undesirable nature of the
computational expense associated with the context switch, it is
important to implement mechanisms to, wherever possible, forgo the
operation.

In light of this, given how other architectural requirements serving
as prerequisites have long been assigned HWCAP bits by the kernel, we
can inexpensively query for their availability before attempting to
read any system registers.  Where one of these early tests fail, we
can assert that the main feature of interest (be it LSE2 or LSE128)
cannot be present, allowing us to return from the function early and
skip the unnecessary expensive kernel-mediated access to system
registers.

libatomic/ChangeLog:

	* config/linux/aarch64/host-config.h (has_lse2): Add test for LSE.
	(has_lse128): Add test for LSE2.
2024-01-28 20:02:17 +00:00
..
config Libatomic: Add checks in ifunc selectors for LSE/LSE2 requirements. 2024-01-28 20:02:17 +00:00
testsuite Update copyright years. 2024-01-03 12:19:35 +01:00
.gitignore
acinclude.m4 libatomic: Enable LSE128 128-bit atomics for Armv9.4-a 2024-01-28 20:02:01 +00:00
aclocal.m4 Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
auto-config.h.in libatomic: Enable LSE128 128-bit atomics for Armv9.4-a 2024-01-28 20:02:01 +00:00
cas_n.c Update copyright years. 2024-01-03 12:19:35 +01:00
ChangeLog Update Copyright year in ChangeLog files 2024-01-03 11:35:18 +01:00
configure libatomic: Enable LSE128 128-bit atomics for Armv9.4-a 2024-01-28 20:02:01 +00:00
configure.ac libatomic: Enable LSE128 128-bit atomics for Armv9.4-a 2024-01-28 20:02:01 +00:00
configure.tgt libatomic: Add support for __ifunc_arg_t arg in ifunc resolver 2024-01-28 19:52:42 +00:00
exch_n.c Update copyright years. 2024-01-03 12:19:35 +01:00
fadd_n.c Update copyright years. 2024-01-03 12:19:35 +01:00
fand_n.c
fence.c Update copyright years. 2024-01-03 12:19:35 +01:00
fenv.c Update copyright years. 2024-01-03 12:19:35 +01:00
fior_n.c
flag.c Update copyright years. 2024-01-03 12:19:35 +01:00
fnand_n.c
fop_n.c Update copyright years. 2024-01-03 12:19:35 +01:00
fsub_n.c
fxor_n.c
gcas.c Update copyright years. 2024-01-03 12:19:35 +01:00
gexch.c Update copyright years. 2024-01-03 12:19:35 +01:00
glfree.c Update copyright years. 2024-01-03 12:19:35 +01:00
gload.c Update copyright years. 2024-01-03 12:19:35 +01:00
gstore.c Update copyright years. 2024-01-03 12:19:35 +01:00
host-config.h Update copyright years. 2024-01-03 12:19:35 +01:00
init.c
libatomic_i.h Update copyright years. 2024-01-03 12:19:35 +01:00
libatomic.map
load_n.c Update copyright years. 2024-01-03 12:19:35 +01:00
Makefile.am libatomic: Enable LSE128 128-bit atomics for Armv9.4-a 2024-01-28 20:02:01 +00:00
Makefile.in libatomic: Enable LSE128 128-bit atomics for Armv9.4-a 2024-01-28 20:02:01 +00:00
store_n.c Update copyright years. 2024-01-03 12:19:35 +01:00
tas_n.c Update copyright years. 2024-01-03 12:19:35 +01:00