Commit ec93c3ed authored by Mikael Ronstrom's avatar Mikael Ronstrom

Force use of c-register in CAS instruction on x86-32 bit architecture,...

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
parent d4f23f0c
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
int32 ebx=(set & 0xFFFFFFFF), ecx=(set >> 32); \ int32 ebx=(set & 0xFFFFFFFF), ecx=(set >> 32); \
asm volatile ("push %%ebx; movl %3, %%ebx;" \ asm volatile ("push %%ebx; movl %3, %%ebx;" \
LOCK_prefix "; cmpxchg8b %0; setz %2; pop %%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)) :"m" (ebx), "c" (ecx))
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment