]> granicus.if.org Git - yasm/commit
Follow-up to #80 and #81: "xchg ax, ax" can use the short 0x90 form as
authorPeter Johnson <peter@tortall.net>
Wed, 4 Oct 2006 04:38:43 +0000 (04:38 -0000)
committerPeter Johnson <peter@tortall.net>
Wed, 4 Oct 2006 04:38:43 +0000 (04:38 -0000)
commitb98e1cb5985820f371daa08c5014f9f7be557380
tree355420254441cdafbb217ab76d41671e3e9736ea
parentb33cfe08b5f52ff85a3fb7026ce39987b4be9778
Follow-up to #80 and #81: "xchg ax, ax" can use the short 0x90 form as
16-bit operations don't clear the high bits of the 64-bit register, so
this is effectively a NOP as well.

While I'm still looking at this, make "xchg rax, rax" not output a REX
prefix.

I thought about being extra-clever and have "xchg ax, ax" not output an
operand-size prefix, but thought better of it: if the user says "ax"
they're probably going to expect the prefix to be there.  Left in as
a comment for future readers of the code.

svn path=/trunk/yasm/; revision=1639
modules/arch/x86/tests/xchg64.hex
modules/arch/x86/x86id.c