From ec93c3ed238c591b0167a8d7f08772308f4e7bd5 Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Mon, 21 Dec 2009 14:08:11 +0100 Subject: [PATCH] Force use of c-register in CAS instruction on x86-32 bit architecture, b-register used for push and pop, so don't want to give compile the chance to choose the wrong register --- include/atomic/x86-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/atomic/x86-gcc.h b/include/atomic/x86-gcc.h index 32839e0a67d..77c32f8d70c 100644 --- a/include/atomic/x86-gcc.h +++ b/include/atomic/x86-gcc.h @@ -108,7 +108,7 @@ int32 ebx=(set & 0xFFFFFFFF), ecx=(set >> 32); \ asm volatile ("push %%ebx; movl %3, %%ebx;" \ LOCK_prefix "; cmpxchg8b %0; setz %2; pop %%ebx"\ - : "+m" (*a), "+A" (*cmp), "=q" (ret) \ + : "+m" (*a), "+A" (*cmp), "=c" (ret) \ :"m" (ebx), "c" (ecx)) #endif