aarch64: Add missing ACLE support for BTI
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 2 Jul 2020 15:04:51 +0000 (16:04 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 9 Jul 2020 08:46:58 +0000 (09:46 +0100)
Define the __ARM_FEATURE_BTI_DEFAULT feature test
macro when BTI branch protection is enabled.

2020-07-09  Szabolcs Nagy  <szabolcs.nagy@arm.com>

gcc/ChangeLog:

* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Add
__ARM_FEATURE_BTI_DEFAULT support.

gcc/config/aarch64/aarch64-c.c

index e1c1cd415dcb66f5a5d2ccbbdab8021ed520fa5e..1882288af8df4c9afae613282a645865b191cb14 100644 (file)
@@ -178,6 +178,9 @@ aarch64_update_cpp_builtins (cpp_reader *pfile)
   aarch64_def_or_undef (TARGET_RNG, "__ARM_FEATURE_RNG", pfile);
   aarch64_def_or_undef (TARGET_MEMTAG, "__ARM_FEATURE_MEMORY_TAGGING", pfile);
 
+  aarch64_def_or_undef (aarch64_bti_enabled (),
+                       "__ARM_FEATURE_BTI_DEFAULT", pfile);
+
   aarch64_def_or_undef (TARGET_I8MM, "__ARM_FEATURE_MATMUL_INT8", pfile);
   aarch64_def_or_undef (TARGET_BF16_SIMD,
                        "__ARM_FEATURE_BF16_VECTOR_ARITHMETIC", pfile);