x86_arch: implement semantic for cmpxchg (WIP) and xchg