"config.sub" did not exist on "fd914447b4251a764c0f0d5e91931d6b1a9b54a4"
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.
Showing
- gcc/config/aarch64/aarch64-c.cc 2 additions, 0 deletionsgcc/config/aarch64/aarch64-c.cc
- gcc/config/aarch64/aarch64.h 5 additions, 0 deletionsgcc/config/aarch64/aarch64.h
- gcc/testsuite/gcc.target/aarch64/acle/bti_def.c 10 additions, 0 deletionsgcc/testsuite/gcc.target/aarch64/acle/bti_def.c
- gcc/testsuite/gcc.target/aarch64/acle/pauth_def.c 10 additions, 0 deletionsgcc/testsuite/gcc.target/aarch64/acle/pauth_def.c
Please register or sign in to comment