This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Inconsistent operand constraints in asm
- From: Andreas Schwab <schwab at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Nov 2002 17:24:01 +0100
- Subject: [tree-ssa] Inconsistent operand constraints in asm
The compiler in the tree-ssa branch is complaining about inconsistent
constraints in GC_test_and_set for ia64. I don't know why it only happens
in this branch.
Andreas.
2002-11-12 Andreas Schwab <schwab@suse.de>
* include/private/gc_locks.h (GC_test_and_set) [IA64]: Fix
operand constraints.
(GC_compare_and_exchange): Likewise.
Index: boehm-gc/include/private/gc_locks.h
===================================================================
RCS file: /cvsroot/gcc/gcc/boehm-gc/include/private/gc_locks.h,v
retrieving revision 1.6.2.1
diff -u -p -a -u -p -a -r1.6.2.1 gc_locks.h
--- boehm-gc/include/private/gc_locks.h 11 Oct 2002 23:54:28 -0000 1.6.2.1
+++ boehm-gc/include/private/gc_locks.h 13 Nov 2002 16:19:52 -0000
@@ -103,8 +103,8 @@
inline static int GC_test_and_set(volatile unsigned int *addr) {
long oldval, n = 1;
__asm__ __volatile__("xchg4 %0=%1,%2"
- : "=r"(oldval), "=m"(*addr)
- : "r"(n), "1"(*addr) : "memory");
+ : "=r"(oldval), "+m"(*addr)
+ : "r"(n) : "memory");
return oldval;
}
# define GC_TEST_AND_SET_DEFINED
@@ -329,9 +329,9 @@
GC_word old, GC_word new_val)
{
unsigned long oldval;
- __asm__ __volatile__("mov ar.ccv=%4 ;; cmpxchg8.rel %0=%1,%2,ar.ccv"
- : "=r"(oldval), "=m"(*addr)
- : "r"(new_val), "1"(*addr), "r"(old) : "memory");
+ __asm__ __volatile__("mov ar.ccv=%3 ;; cmpxchg8.rel %0=%1,%2,ar.ccv"
+ : "=r"(oldval), "+m"(*addr)
+ : "r"(new_val), "r"(old) : "memory");
return (oldval == old);
}
# endif /* !GENERIC_COMPARE_AND_SWAP */
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."