From c9bd45d6aadc32697ff16cfe0439be9f395969c0 Mon Sep 17 00:00:00 2001 From: Ramana Radhakrishnan Date: Wed, 1 May 2019 15:27:40 +0000 Subject: [PATCH] [Patch AArch64] Add __ARM_FEATURE_ATOMICS 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: r270770 --- gcc/ChangeLog | 9 ++++++++- gcc/config/aarch64/aarch64-c.c | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d8bb38f6fb83..6d1af9a0ab5e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-05-01 Ramana Radhakrishnan + + Backport from mainline. + 2019-04-30 Ramana Radhakrishnan + PR target/86538 + * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): + Define __ARM_FEATURE_ATOMICS + 2019-04-30 Srinath Parvathaneni PR target/90075 @@ -6,7 +14,6 @@ Backport from mainline 2018-12-11 Richard Earnshaw - PR target/37369 * config/aarch64/iterators.md (sizem1): Add sizes for SFmode and DFmode. diff --git a/gcc/config/aarch64/aarch64-c.c b/gcc/config/aarch64/aarch64-c.c index 177e638682f9..9979e06daaf7 100644 --- a/gcc/config/aarch64/aarch64-c.c +++ b/gcc/config/aarch64/aarch64-c.c @@ -134,6 +134,8 @@ aarch64_update_cpp_builtins (cpp_reader *pfile) aarch64_def_or_undef (TARGET_CRYPTO, "__ARM_FEATURE_CRYPTO", pfile); aarch64_def_or_undef (TARGET_SIMD_RDMA, "__ARM_FEATURE_QRDMX", pfile); + aarch64_def_or_undef (TARGET_LSE, "__ARM_FEATURE_ATOMICS", pfile); + /* Not for ACLE, but required to keep "float.h" correct if we switch target between implementations that do or do not support ARMv8.2-A 16-bit floating-point extensions. */ -- 2.47.2