mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
bb72f7f111
Un-special-case "xchg rax,rax"; allow it to be encoded as 48 90 for orthogonality's sake. It's a no-op, to be sure, but so are many other instructions. "xchg eax,eax" is still special-cased in 64-bit mode since it is not a no-op; unadorned opcode 90 is now simply "nop" and nothing else. Make the disassembler detect unused REX.W and display them as an "o64" prefix.
15 lines
137 B
NASM
15 lines
137 B
NASM
bits 64
|
|
|
|
nop
|
|
o64 nop
|
|
pause
|
|
o64 pause
|
|
|
|
xchg ax,ax
|
|
xchg eax,eax
|
|
xchg rax,rax
|
|
|
|
rep xchg ax,ax
|
|
rep xchg eax,eax
|
|
rep xchg rax,rax
|