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]

[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;
         }


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