A.5.31 CMPXCHG8B: Compare and Exchange Eight Bytes
CMPXCHG8B mem ; 0F C7 /1 [PENT]
This is a larger and more unwieldy version of CMPXCHG: it compares the
64-bit (eight-byte) value stored at [mem] with the value in EDX:EAX. If
they are equal, it sets the zero flag and stores ECX:EBX into the memory
area. If they are unequal, it clears the zero flag and stores the memory
contents into EDX:EAX.
CMPXCHG8B can be used with the LOCK prefix, to allow atomic execution.
This is useful in multi-processor and multi-tasking environments.