Message ID | 30d8962517ee26ca0f3bb78abe97a3009219b9fd.1594224951.git.szabolcs.nagy@arm.com |
---|---|
State | New |
Headers | show |
Series | aarch64: Fix target libraries for BTI [PR96001] | expand |
> -----Original Message----- > From: Szabolcs Nagy <Szabolcs.Nagy@arm.com> > Sent: 08 July 2020 17:26 > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Kyrylo Tkachov > <Kyrylo.Tkachov@arm.com> > Subject: [PATCH 1/6] aarch64: Add missing ACLE support for BTI > > Define the __ARM_FEATURE_BTI_DEFAULT feature test > macro when BTI branch protection is enabled. > Ok. Thanks, Kyrill > gcc/ChangeLog: > > 2020-07-08 Szabolcs Nagy <szabolcs.nagy@arm.com> > > * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Add > __ARM_FEATURE_BTI_DEFAULT support. > --- > gcc/config/aarch64/aarch64-c.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/gcc/config/aarch64/aarch64-c.c b/gcc/config/aarch64/aarch64-c.c > index e1c1cd415dc..1882288af8d 100644 > --- a/gcc/config/aarch64/aarch64-c.c > +++ b/gcc/config/aarch64/aarch64-c.c > @@ -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); > -- > 2.17.1
diff --git a/gcc/config/aarch64/aarch64-c.c b/gcc/config/aarch64/aarch64-c.c index e1c1cd415dc..1882288af8d 100644 --- a/gcc/config/aarch64/aarch64-c.c +++ b/gcc/config/aarch64/aarch64-c.c @@ -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);