This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Re: [PATCH][AArch64] Testcase fix for __ATOMIC_CONSUME
- From: Alex Velenko <Alex dot Velenko at arm dot com>
- To: Mike Stump <mikestump at comcast dot net>, Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>
- Date: Mon, 09 Feb 2015 15:11:45 +0000
- Subject: Re: Re: [PATCH][AArch64] Testcase fix for __ATOMIC_CONSUME
- Authentication-results: sourceware.org; auth=none
- References: <1422375847-18680-1-git-send-email-alex dot velenko at arm dot com> <A97E3995-549C-4A0B-B6A3-1207917FCC8F at comcast dot net> <CAFqB+PyB_qHHLmzzmx9QVsRkaS8JKYOzYwiZP2D0qxrXDa=uDw at mail dot gmail dot com> <58101C4C-374A-43E5-B255-C97CE3046A2C at comcast dot net>
On 28/01/15 18:50, Mike Stump wrote:
On Jan 28, 2015, at 9:51 AM, Marcus Shawcroft <marcus.shawcroft@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.Velenko@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--