]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Patch AArch64] Add __ARM_FEATURE_ATOMICS
authorRamana Radhakrishnan <ramana.radhakrishnan@arm.com>
Tue, 30 Apr 2019 12:02:30 +0000 (12:02 +0000)
committerRamana Radhakrishnan <ramana@gcc.gnu.org>
Tue, 30 Apr 2019 12:02:30 +0000 (12:02 +0000)
This keeps coming up repeatedly and the ACLE has finally added
__ARM_FEATURE_ATOMICS for the LSE feature in GCC. This is now part of
the latest ACLE release
(https://developer.arm.com/docs/101028/latest/5-feature-test-macros)

I know it's late for GCC-9 but this is a simple macro which need not
wait  for another year.

Ok for trunk and to backport to all release branches ?

Tested with a simple build and a smoke test.

Backport from mainline.
PR target/86538
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
__ARM_FEATURE_ATOMICS

From-SVN: r270689

gcc/ChangeLog
gcc/config/aarch64/aarch64-c.c

index 12ae3b6e58f0d436baec0f0469d95e35cb933089..8f8a7763c8d448ffd92564bb1199564657c4f405 100644 (file)
@@ -1,3 +1,11 @@
+2019-04-30  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+       Backport from mainline.
+       2019-04-30  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+       PR target/86538
+       * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
+       Define __ARM_FEATURE_ATOMICS
+
 2019-04-30  Martin Liska  <mliska@suse.cz>
 
        Backport from mainline
index fcb1e80177dc549ba03b09778618a91f022777b7..6d5acb02fc6c0bdecde8561121d9469e85802d9b 100644 (file)
@@ -147,6 +147,7 @@ aarch64_update_cpp_builtins (cpp_reader *pfile)
       builtin_define_with_int_value ("__ARM_FEATURE_SVE_BITS", bits);
     }
 
+  aarch64_def_or_undef (TARGET_LSE, "__ARM_FEATURE_ATOMICS", pfile);
   aarch64_def_or_undef (TARGET_AES, "__ARM_FEATURE_AES", pfile);
   aarch64_def_or_undef (TARGET_SHA2, "__ARM_FEATURE_SHA2", pfile);
   aarch64_def_or_undef (TARGET_SHA3, "__ARM_FEATURE_SHA3", pfile);