This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed, testsuite, ia64] Patch to fix gcc.target/ia64/sync-1.c
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 28 Apr 2009 09:12:58 -0700 (PDT)
- Subject: [committed, testsuite, ia64] Patch to fix gcc.target/ia64/sync-1.c
- Reply-to: sje at cup dot hp dot com
I am checking in this testsuite fix as obvious. The test uses a long
variable and then looks for the cmpxchg8 instruction but long is only 8
bytes long in lp64 mode. In ilp32 mode the long is 4 bytes and we
generate a cmpxchg4 instruction.
Tested on IA64 HP-UX and Linux.
Steve Ellcey
sje@cup.hp.com
2009-04-28 Steve Ellcey <sje@cup.hp.com>
* testsuite/gcc.target/ia64/sync-1.c: Check for cmpxchg8 only if
lp64 is true.
Index: gcc.target/ia64/sync-1.c
===================================================================
--- gcc.target/ia64/sync-1.c (revision 146867)
+++ gcc.target/ia64/sync-1.c (working copy)
@@ -2,7 +2,7 @@
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler "xchg4 .*, r0" } } */
/* { dg-final { scan-assembler "cmpxchg4.*, r0, .*" } } */
-/* { dg-final { scan-assembler "cmpxchg8.*, r0, .*" } } */
+/* { dg-final { scan-assembler "cmpxchg8.*, r0, .*" { target lp64 } } } */
int
foo1 (int *p)