aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVictor Do Nascimento <victor.donascimento@arm.com>2023-12-19 23:19:22 +0000
committerVictor Do Nascimento <victor.donascimento@arm.com>2024-01-28 20:02:17 +0000
commit7dd4466b3954ede754a5a884c5b8fdcd512024d8 (patch)
treeb3151cc4915d01f87d08180b5b93e33b852e9a57 /gcc
parent5ad64d76c05faf426b21e60a148f0b34457ee8e5 (diff)
downloadgcc-7dd4466b3954ede754a5a884c5b8fdcd512024d8.zip
gcc-7dd4466b3954ede754a5a884c5b8fdcd512024d8.tar.gz
gcc-7dd4466b3954ede754a5a884c5b8fdcd512024d8.tar.bz2
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.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions