mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
use cmpxchgq for 64-bit operands in atomicCompareAndSwap
This commit is contained in:
parent
2276eece0e
commit
a0d763d871
@ -212,7 +212,7 @@ atomicCompareAndSwap(uintptr_t* p, uintptr_t old, uintptr_t new_)
|
|||||||
#elif defined ARCH_x86_64
|
#elif defined ARCH_x86_64
|
||||||
uint8_t result;
|
uint8_t result;
|
||||||
|
|
||||||
__asm__ __volatile__("lock; cmpxchg1 %2, %0; setz %1"
|
__asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1"
|
||||||
: "=m"(*p), "=q"(result)
|
: "=m"(*p), "=q"(result)
|
||||||
: "r"(new_), "a"(old), "m"(*p)
|
: "r"(new_), "a"(old), "m"(*p)
|
||||||
: "memory");
|
: "memory");
|
||||||
|
Loading…
Reference in New Issue
Block a user