On 28/01/15 18:50, Mike Stump wrote:
On Jan 28, 2015, at 9:51 AM, Marcus Shawcroft <marcus.shawcr...@gmail.com>
wrote:
Going forward we can [ … ] xfail the test case pending a proper solution to
59448 ?
Mike do you prefer one of the other two approaches ?
I’d xfail the test case and mark with the fix consume PR. If we don’t have an
unambiguous, fix consume PR, I’d file that. It should be listed as failing on
aarch, and the fix for that PR should then make the aarch test case pass. This
way no one can run off with the PR and do anything else with it.
Hi, Mike!
Sorry for the delay.
The following patch makes atomic-op-consume.c XFAIL for both
gcc.target/arm and gcc.target/aarch64 tests. XFAIL was chosen as
prefered approach for handling __ATOMIC_CONSUME to __ATOMIC_ACQUIRE
promotion workaround.
This patch was tested by running the modified tests on aarch64-none-elf
and arm-none-eabi compilers.
Is this patch ok?
Alex
2015-02-09 Alex Velenko <alex.vele...@arm.com>
gcc/testsuite/
* gcc.target/aarch64/atomic-op-consume.c (scan-assember-times):
Directive adjusted to XFAIL.
* gcc.target/arm/atomic-op-consume.c (scan-assember-times): Directive
adjusted to XFAIL.
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
b/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
index 38d6c2c..8150af6 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 __ATOMIC_CONSUME
is always
+ promoted to __ATOMIC_ACQUIRE, implemented as MEMMODEL_ACQUIRE. This
causes
+ "LDAXR" to be generated instead of "LDXR". Therefore, "LDXR" test is
+ expected to fail. */
+/* { dg-final { scan-assembler-times "ldxr\tw\[0-9\]+,
\\\[x\[0-9\]+\\\]" 6 { xfail *-*-* } } } */
/* { dg-final { scan-assembler-times "stxr\tw\[0-9\]+, w\[0-9\]+,
\\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
b/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
index cc6c028..060655c 100644
--- a/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
@@ -7,7 +7,8 @@
/* To workaround Bugzilla 59448 issue, a request for __ATOMIC_CONSUME
is always
promoted to __ATOMIC_ACQUIRE, implemented as MEMMODEL_ACQUIRE.
This causes
- "LDAEX" to be generated instead of "LDREX". */
-/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+,
\\\[r\[0-9\]+\\\]" 6 } } */
+ "LDAEX" to be generated instead of "LDREX". Therefore, "LDREX" test is
+ expected to fail. */
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+,
\\\[r\[0-9\]+\\\]" 6 { xfail *-*-* } } } */
/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+,
\\\[r\[0-9\]+\\\]" 6 } } */
/* { dg-final { scan-assembler-not "dmb" } } */
--------------1.8.1.2--