possible asm syntax errors in spinlock.h

Olaf Hering olh at suse.de
Wed Jan 14 05:45:13 EST 2004


 On Tue, Jan 13, Segher Boessenkool wrote:

> >This one might fix it, according to Segher.
> >
> >Please review.
>
> I think you changed more than are really necessary, but I don't have
> the code handy to really check.  You only need to change the args
> that are used in constructs like  some_load_or_store some_offset(%N)  .

This one might work better:


--- /dev/shm/linuxppc64-2.5/include/asm-ppc64/spinlock.h	2003-11-14 19:45:32.000000000 +0100
+++ ./include/asm-ppc64/spinlock.h	2004-01-13 19:31:06.000000000 +0100
@@ -95,7 +95,7 @@ static __inline__ void _raw_spin_lock(sp
 	stdcx.		13,0,%2\n\
 	bne-		2b\n\
 	isync"
-	: "=&r"(tmp), "=&r"(tmp2)
+	: "=&b"(tmp), "=&r"(tmp2)
 	: "r"(&lock->lock)
 	: "r0", "r3", "r4", "r5", "ctr", "cr0", "cr1", "cr2", "cr3", "cr4",
 	  "xer", "memory");
@@ -133,7 +133,7 @@ static __inline__ void _raw_spin_lock(sp
 	stdcx.		13,0,%2\n\
 	bne-		2b\n\
 	isync"
-	: "=&r"(tmp), "=&r"(tmp2)
+	: "=&b"(tmp), "=&r"(tmp2)
 	: "r"(&lock->lock)
 	: "r3", "r4", "r5", "cr0", "cr1", "ctr", "xer", "memory");
 }
@@ -253,7 +253,7 @@ static __inline__ void _raw_read_lock(rw
 	stdcx.		%0,0,%2\n\
 	bne-		2b\n\
 	isync"
-	: "=&r"(tmp), "=&r"(tmp2)
+	: "=&b"(tmp), "=&r"(tmp2)
 	: "r"(&rw->lock)
 	: "r0", "r3", "r4", "r5", "ctr", "cr0", "cr1", "cr2", "cr3", "cr4",
 	  "xer", "memory");
@@ -290,7 +290,7 @@ static __inline__ void _raw_read_lock(rw
 	stdcx.		%0,0,%2\n\
 	bne-		2b\n\
 	isync"
-	: "=&r"(tmp), "=&r"(tmp2)
+	: "=&b"(tmp), "=&r"(tmp2)
 	: "r"(&rw->lock)
 	: "r3", "r4", "r5", "cr0", "cr1", "ctr", "xer", "memory");
 }
@@ -393,7 +393,7 @@ static __inline__ void _raw_write_lock(r
 	stdcx.		13,0,%2\n\
 	bne-		2b\n\
 	isync"
-	: "=&r"(tmp), "=&r"(tmp2)
+	: "=&b"(tmp), "=&r"(tmp2)
 	: "r"(&rw->lock)
 	: "r0", "r3", "r4", "r5", "ctr", "cr0", "cr1", "cr2", "cr3", "cr4",
 	  "xer", "memory");
@@ -433,7 +433,7 @@ static __inline__ void _raw_write_lock(r
 	stdcx.		13,0,%2\n\
 	bne-		2b\n\
 	isync"
-	: "=&r"(tmp), "=&r"(tmp2)
+	: "=&b"(tmp), "=&r"(tmp2)
 	: "r"(&rw->lock)
 	: "r3", "r4", "r5", "cr0", "cr1", "ctr", "xer", "memory");
 }

--
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list