[Bug target/86538] GCC should define a macro to specify if LSE is enabled or not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86538 Ramana Radhakrishnan changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #8 from Ramana Radhakrishnan --- Now fixed on trunk and all release branches.
[Bug target/86538] GCC should define a macro to specify if LSE is enabled or not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86538 --- Comment #7 from Ramana Radhakrishnan --- Author: ramana Date: Wed May 1 15:27:40 2019 New Revision: 270770 URL: https://gcc.gnu.org/viewcvs?rev=270770&root=gcc&view=rev Log: [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 Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/aarch64/aarch64-c.c
[Bug target/86538] GCC should define a macro to specify if LSE is enabled or not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86538 --- Comment #6 from Ramana Radhakrishnan --- Author: ramana Date: Tue Apr 30 14:57:50 2019 New Revision: 270702 URL: https://gcc.gnu.org/viewcvs?rev=270702&root=gcc&view=rev Log: [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 Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/config/aarch64/aarch64-c.c
[Bug target/86538] GCC should define a macro to specify if LSE is enabled or not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86538 --- Comment #5 from Ramana Radhakrishnan --- Author: ramana Date: Tue Apr 30 12:02:30 2019 New Revision: 270689 URL: https://gcc.gnu.org/viewcvs?rev=270689&root=gcc&view=rev Log: [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 Modified: branches/gcc-9-branch/gcc/ChangeLog branches/gcc-9-branch/gcc/config/aarch64/aarch64-c.c
[Bug target/86538] GCC should define a macro to specify if LSE is enabled or not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86538 --- Comment #4 from Ramana Radhakrishnan --- Author: ramana Date: Tue Apr 30 11:22:11 2019 New Revision: 270686 URL: https://gcc.gnu.org/viewcvs?rev=270686&root=gcc&view=rev Log: [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 Modified: trunk/gcc/ChangeLog trunk/gcc/config/aarch64/aarch64-c.c
[Bug target/86538] GCC should define a macro to specify if LSE is enabled or not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86538 Ramana Radhakrishnan changed: What|Removed |Added Status|RESOLVED|ASSIGNED Last reconfirmed||2019-04-30 CC||ramana at gcc dot gnu.org Resolution|WONTFIX |--- Assignee|unassigned at gcc dot gnu.org |ramana at gcc dot gnu.org Target Milestone|--- |7.5 Ever confirmed|0 |1 --- Comment #3 from Ramana Radhakrishnan --- reopening and taking.
[Bug target/86538] GCC should define a macro to specify if LSE is enabled or not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86538 --- Comment #2 from Steve Ellcey --- While I agree that we want users to use the __sync and atomic primitives, it still seems like it would be useful in some cases to know if the LSE operations are available and if GCC is generating code for them. I.e. is TARGET_LSE set or not. I don't like the idea of hiding information (or making it hard to determine) just because it might be misused. I will probably create a patch for this and submit it to gcc-patches to see if there is any support for it.
[Bug target/86538] GCC should define a macro to specify if LSE is enabled or not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86538 Richard Earnshaw changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #1 from Richard Earnshaw --- GCC just implements the ACLE specification in this regard. That doesn't define anything for the LSE extensions. I understand that is deliberate. 1) The recommendation is to use the standard __sync and atomic primitives already defined by the compiler. 2) Hand-coding equivalents in assembly can often lead to architecturally incorrect programs that just appear to work, but might fail if run on other systems. So I think this is a wontfix.
[Bug target/86538] GCC should define a macro to specify if LSE is enabled or not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86538 Richard Earnshaw changed: What|Removed |Added Resolution|FIXED |WONTFIX