aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2022-12-12 11:07:45 +0000
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>2022-12-12 11:07:45 +0000
commit688f4eb28186daf333f7a7f5b1bdc1df43bb6c47 (patch)
tree65973cd6a3145240a6feb8fd29bb27f7e29b3015 /gcc/tree.h
parent49bf49bb6174734879adcba7fb340c1c8f5dd253 (diff)
downloadgcc-688f4eb28186daf333f7a7f5b1bdc1df43bb6c47.zip
gcc-688f4eb28186daf333f7a7f5b1bdc1df43bb6c47.tar.gz
gcc-688f4eb28186daf333f7a7f5b1bdc1df43bb6c47.tar.bz2
aarch64: Add __ARM_FEATURE_PAUTH and __ARM_FEATURE_BTI ACLE defines
Recent ACLE additions specified the __ARM_FEATURE_PAUTH and __ARM_FEATURE_BTI macros [1] that the compiler should define when the pointer authentication and BTI instructions are available (and don't act as NOPs). We've received requests to enable them in GCC for aarch64, similar to clang [2]. It's a fairly simple patch and should be non-intrusive at this stage. Pointer authentication has its own "pauth" feature flag, whereas BTI depends on an architecture level of Armv8.5-a or later. Bootstrapped and tested on aarch64-none-linux-gnu. [1] https://github.com/ARM-software/acle/blob/main/main/acle.md#pointer-authentication [2] https://reviews.llvm.org/rG7d40baa82b1f272f68de63f3c4f68d970bdcd6ed gcc/ChangeLog: * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Define __ARM_FEATURE_PAUTH and __ARM_FEATURE_BTI when appropriate. * config/aarch64/aarch64.h (TARGET_BTI): Define. gcc/testsuite/ChangeLog: * gcc.target/aarch64/acle/bti_def.c: New test. * gcc.target/aarch64/acle/pauth_def.c: New test.
Diffstat (limited to 'gcc/tree.h')
0 files changed, 0 insertions, 0 deletions