]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Disable sysreg feature gating
authorAlice Carlotti <alice.carlotti@arm.com>
Tue, 15 Apr 2025 16:36:25 +0000 (17:36 +0100)
committerAlice Carlotti <alice.carlotti@arm.com>
Wed, 16 Apr 2025 01:07:36 +0000 (02:07 +0100)
commit43cbf049f5b017316f6fb1ea5f95784194323a51
treef213f67012a9e70e151bf94950c79698f247a261
parent60130b2d3338c03b5983048fe5405c7175dd47c4
aarch64: Disable sysreg feature gating

This applies to the sysreg read/write intrinsics __arm_[wr]sr*.  It does
not depend on changes to Binutils, because GCC converts recognised
sysreg names to an encoding based form, which is already ungated in Binutils.

We have, however, agreed to make an equivalent change in Binutils (which
would then disable feature gating for sysreg accesses in inline
assembly), but this has not yet been posted upstream.

In the future we may introduce a new flag to renable some checking,
but these checks could not be comprehensive because many system
registers depend on architecture features that don't have corresponding
GCC/GAS --march options.  This would also depend on addressing numerous
inconsistencies in the existing list of sysreg feature dependencies.

gcc/ChangeLog:

* config/aarch64/aarch64.cc
(aarch64_valid_sysreg_name_p): Remove feature check.
(aarch64_retrieve_sysreg): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/acle/rwsr-ungated.c: New test.
gcc/config/aarch64/aarch64.cc
gcc/testsuite/gcc.target/aarch64/acle/rwsr-ungated.c [new file with mode: 0644]