XCHG
DATAXFER I86 x86_64
XCHG is an instruction of the x86_64 architecture (x86 / x86-64 (covers 16/32/64-bit modes)), category DATAXFER. This page lists its 5 encoding forms, distinguished by opcode bytes: 00, 86, 87.
Each form below links to its full decode: the operand roles and where each one is encoded in the instruction, the flag and register effects, and any micro-op sequence authored for it.
XED_XCHG_X86_LEGACY_ONEBYTE_00_816468
REG0=GPRv_SB():rw REG1=OrAX():rw:IMPL REG0=GPRv_SB():rw REG1=OrAX():rw:IMPL REG0=GPRv_SB():rw REG1=OrAX():rw:IMPL
XED_XCHG_X86_LEGACY_ONEBYTE_86_431854
REG0=GPR8_B():rw REG1=GPR8_R():rw
XED_XCHG_X86_LEGACY_ONEBYTE_86_964998
MEM0:rw:b REG0=GPR8_R():rw MEM0:rw:b REG0=GPR8_R():rw
XED_XCHG_X86_LEGACY_ONEBYTE_87_256512
MEM0:rw:v REG0=GPRv_R():rw MEM0:rw:v REG0=GPRv_R():rw
XED_XCHG_X86_LEGACY_ONEBYTE_87_823004
REG0=GPRv_B():rw REG1=GPRv_R():rw