Assembly implementation for atomic operations (x86 and AMD64).