Is there an 8-bit atomic CAS (cmpxchg) intrinsic for X64 in Visual C++?
No, that doesn't exist. You can implement it out-of-line though, if needed.
atomic_msvc_x64.asm
_text SEGMENT
; char _InterlockedCompareExchange8(volatile char*, char NewValue, char Expected)
; - RCX, RDX, R8
_InterlockedCompareExchange8 PROC
mov eax,r8d
lock cmpxchg [rcx],dl
ret
_InterlockedCompareExchange8 ENDP
_text ENDS
END
Verified for Visual Studio 2012 that this intrinsic does exist :
char _InterlockedCompareExchange8(volatile char*, char NewValue, char Expected)
However, it appears nowhere in the documentation.