This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] boehm-gc/include/private/gc_locks.h: Fix a constraint.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 15 Sep 2005 15:36:50 -0700
- Subject: [patch] boehm-gc/include/private/gc_locks.h: Fix a constraint.
Hi,
Attached is a patch to fix a constraint to prevent an invalid
instruction like
swp r0, r4, [r0]
At least the assembler didn't like this while porting
arm-none-linux-gnueabi to mainline from csl-arm.
Committed to mainline as preapproved by Paul Brook.
Kazu Hirata
2005-09-15 Kazu Hirata <kazu@codesourcery.com>
* include/private/gc_locks.h (GC_test_and_set): Change the
constraint of the first operand to '0'.
Index: boehm-gc/include/private/gc_locks.h
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/boehm-gc/include/private/gc_locks.h,v
retrieving revision 1.10
diff -u -d -p -r1.10 gc_locks.h
--- boehm-gc/include/private/gc_locks.h 19 Apr 2005 16:01:38 -0000 1.10
+++ boehm-gc/include/private/gc_locks.h 15 Sep 2005 20:50:20 -0000
@@ -209,7 +209,7 @@
/* See linuxthreads/sysdeps/arm/pt-machine.h in glibc-2.1 */
__asm__ __volatile__("swp %0, %1, [%2]"
: "=r"(oldval)
- : "r"(1), "r"(addr)
+ : "0"(1), "r"(addr)
: "memory");
return oldval;
}