aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorAndrew Carlotti <andrew.carlotti@arm.com>2025-01-09 19:33:25 +0000
committerAndrew Carlotti <andrew.carlotti@arm.com>2025-01-24 19:09:10 +0000
commitb53781ce1e49fcaa18c2b7c0d4602c6ed780a9e9 (patch)
treeb1481636c65745faa334f856d54a1fbc7d44b276 /gcc/config
parentc6ef35b4c3c092bf5e0171827ed918d4249575ca (diff)
downloadgcc-b53781ce1e49fcaa18c2b7c0d4602c6ed780a9e9.zip
gcc-b53781ce1e49fcaa18c2b7c0d4602c6ed780a9e9.tar.gz
gcc-b53781ce1e49fcaa18c2b7c0d4602c6ed780a9e9.tar.bz2
aarch64: Make AARCH64_FL_CRYPTO always unset
This feature flag bit only exists to support the +crypto alias. Outside of option processing this bit needs to be set or unset consistently. This patch goes with the latter option. gcc/ChangeLog: * common/config/aarch64/aarch64-common.cc: Assert that CRYPTO bit is not set. * config/aarch64/aarch64-feature-deps.h (info<FEAT>.explicit_on): Unset CRYPTO bit. (cpu_##CORE_IDENT): Ditto. gcc/testsuite/ChangeLog: * gcc.target/aarch64/crypto-alias-1.c: New test.
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/aarch64/aarch64-feature-deps.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/config/aarch64/aarch64-feature-deps.h b/gcc/config/aarch64/aarch64-feature-deps.h
index 67c3a5d..55a0dbf 100644
--- a/gcc/config/aarch64/aarch64-feature-deps.h
+++ b/gcc/config/aarch64/aarch64-feature-deps.h
@@ -56,7 +56,8 @@ get_enable (T1 i, Ts... args)
- explicit_on: the transitive closure of the features that an
explicit +FEATURE enables, including FLAG itself. This is
- always a superset of ENABLE
+ always a superset of ENABLE, except that the CRYPTO alias bit is
+ explicitly unset for consistency.
Also define a function FEATURE () that returns an info<FEATURE>
(which is an empty structure, since all members are static).
@@ -69,7 +70,8 @@ template<aarch64_feature> struct info;
template<> struct info<aarch64_feature::IDENT> { \
static constexpr auto flag = AARCH64_FL_##IDENT; \
static constexpr auto enable = flag | get_enable REQUIRES; \
- static constexpr auto explicit_on = enable | get_enable EXPLICIT_ON; \
+ static constexpr auto explicit_on \
+ = (enable | get_enable EXPLICIT_ON) & ~AARCH64_FL_CRYPTO; \
}; \
constexpr aarch64_feature_flags info<aarch64_feature::IDENT>::flag; \
constexpr aarch64_feature_flags info<aarch64_feature::IDENT>::enable; \
@@ -114,9 +116,11 @@ get_flags_off (aarch64_feature_flags mask)
#include "config/aarch64/aarch64-option-extensions.def"
/* Define cpu_<NAME> variables for each CPU, giving the transitive
- closure of all the features that the CPU supports. */
+ closure of all the features that the CPU supports. The CRYPTO bit is just
+ an alias, so explicitly unset it for consistency. */
#define AARCH64_CORE(A, CORE_IDENT, C, ARCH_IDENT, FEATURES, F, G, H, I) \
- constexpr auto cpu_##CORE_IDENT = ARCH_IDENT ().enable | get_enable FEATURES;
+ constexpr auto cpu_##CORE_IDENT \
+ = (ARCH_IDENT ().enable | get_enable FEATURES) & ~AARCH64_FL_CRYPTO;
#include "config/aarch64/aarch64-cores.def"
/* Define fmv_deps_<NAME> variables for each FMV feature, giving the transitive