Commit abb3c64e by Ramana Radhakrishnan Committed by Ramana Radhakrishnan

[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.

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

From-SVN: r270686
parent 95767c65
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> 2019-04-30 Martin Liska <mliska@suse.cz>
* gimple-fold.c (gimple_fold_builtin_memory_op): Change endp * gimple-fold.c (gimple_fold_builtin_memory_op): Change endp
......
...@@ -147,6 +147,7 @@ aarch64_update_cpp_builtins (cpp_reader *pfile) ...@@ -147,6 +147,7 @@ aarch64_update_cpp_builtins (cpp_reader *pfile)
builtin_define_with_int_value ("__ARM_FEATURE_SVE_BITS", bits); 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_AES, "__ARM_FEATURE_AES", pfile);
aarch64_def_or_undef (TARGET_SHA2, "__ARM_FEATURE_SHA2", pfile); aarch64_def_or_undef (TARGET_SHA2, "__ARM_FEATURE_SHA2", pfile);
aarch64_def_or_undef (TARGET_SHA3, "__ARM_FEATURE_SHA3", pfile); aarch64_def_or_undef (TARGET_SHA3, "__ARM_FEATURE_SHA3", pfile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment