This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][AArch64] Testcase fix for __ATOMIC_CONSUME
- From: Alex Velenko <alex dot velenko at arm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Marcus dot Shawcroft at arm dot com, alex dot velenko at arm dot com
- Date: Wed, 21 Jan 2015 17:39:12 +0000
- Subject: [PATCH][AArch64] Testcase fix for __ATOMIC_CONSUME
- Authentication-results: sourceware.org; auth=none
Hi,
Is the following patch ok?
regards,
Alex
This patch fixes aarch64/atomic-op-consume.c test to expect safe assembly to be
generated when __ATOMIC_CONSUME semantics is requested.
2015-01-21 Alex Velenko Alex.Velenko@arm.com
gcc/testsuite/
gcc.target/aarch64/atomic-op-consume.c(scan-assember-times): Modified.
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
index 38d6c2c..cf33be2 100644
--- a/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
@@ -3,5 +3,9 @@
#include "atomic-op-consume.x"
-/* { dg-final { scan-assembler-times "ldxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
+/* To workaround Bugzilla 59448 issue, a request for memory behaviour
+ __ATOMIC_CONSUME is promoted to MEMMODEL_ACQUIRE behaviour, not
+ MEMMODEL_CONSUME behaviour. This causes "ldaxr" to be generated
+ instead of "ldxr". */
+/* { dg-final { scan-assembler-times "ldaxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
/* { dg-final { scan-assembler-times "stxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */