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

This commit is contained in:
Mikael Ronstrom 2009-12-21 14:08:11 +01:00
parent d4f23f0cf6
commit ec93c3ed23

View file

@ -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