Explorar o código

fix arm atomic asm register constraint

the "m" constraint could give a memory reference with an offset that's
not compatible with ldrex/strex, so the arm-specific "Q" constraint is
needed instead.
Rich Felker %!s(int64=11) %!d(string=hai) anos
pai
achega
efe07b0f89
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/arm/atomic.h

+ 1 - 1
arch/arm/atomic.h

@@ -37,7 +37,7 @@ static inline int __k_cas(int t, int s, volatile int *p)
 		"	beq 1b\n"
 		"	mcr p15,0,r0,c7,c10,5\n"
 		: "=&r"(ret)
-		: "r"(t), "r"(s), "m"(*p)
+		: "r"(t), "r"(s), "Q"(*p)
 		: "memory", "cc" );
 	return ret;
 }