This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed, testsuite, ia64] Patch to fix gcc.target/ia64/sync-1.c


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]