Browse code

- fastlock arm fix: arm early clobber added: according to the swp instruction specification the address register must be != from the other 2 . Fix from openser, originally sent by Julien Blache <jblache@debian.org>)

Andrei Pelinescu-Onciul authored on 22/11/2006 18:46:04
Showing 1 changed files
... ...
@@ -53,6 +53,9 @@
53 53
  *              ppc, mips*, alpha optimizations (andrei)
54 54
  * 2006-04-05  ppc fixes (s/stw/stwx/, s/lwz/lwzx), early clobber added
55 55
  *             where needed (andrei)
56
+ * 2006-11-22  arm early clobber added: according to the swp instruction 
57
+ *              specification the address register must be != from the other 2
58
+ *              (Julien Blache <jblache@debian.org>)
56 59
  *
57 60
  */
58 61
 
... ...
@@ -222,7 +225,7 @@ inline static int tsl(fl_lock_t* lock)
222 222
 #elif defined __CPU_arm 
223 223
 	asm volatile(
224 224
 			"swp %0, %2, [%3] \n\t"
225
-			: "=r" (val), "=m"(*lock) : "r"(1), "r" (lock) : "memory"
225
+			: "=&r" (val), "=m"(*lock) : "r"(1), "r" (lock) : "memory"
226 226
 	);
227 227
 #elif defined __CPU_arm6
228 228
 	asm volatile(