引言:xchg做了什么? 首先,xchg eax, ecx并不会比mov edx, eax + mov eax, ecx + mov ecx, edx这三条指令加一起快,原因是xchg有副作用. Microsoft Platform SDK: MemoryBarrierThe MemoryBarrier macro ensures that all memory load or store operations before it are completed before any load or…