From 78ee3759b8215da7bacd8a2a9c4e7cfd0af3a0aa Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Tue, 3 May 2016 01:16:43 +0200 Subject: x86-asm: Fix lcall/ljmp, xchg and inc/dec Various x86 asm fixes: 64bit lcall/ljmp like 32bit a commit before, xchgw accepted wrong operands on 32 and 64bit, and 64bit used 0x40/0x48+reg for incw/decw, but those are REX prefixes, not instructions. --- i386-asm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'i386-asm.h') diff --git a/i386-asm.h b/i386-asm.h index 2621db0..af21443 100644 --- a/i386-asm.h +++ b/i386-asm.h @@ -135,8 +135,8 @@ ALT(DEF_ASM_OP1(popw, 0x58, 0, OPC_REG | OPC_WL, OPT_REGW)) ALT(DEF_ASM_OP1(popw, 0x8f, 0, OPC_MODRM | OPC_WL, OPT_REGW | OPT_EA)) ALT(DEF_ASM_OP1(popw, 0x07, 0, OPC_WL, OPT_SEG)) -ALT(DEF_ASM_OP2(xchgw, 0x90, 0, OPC_REG | OPC_WL, OPT_REG, OPT_EAX)) -ALT(DEF_ASM_OP2(xchgw, 0x90, 0, OPC_REG | OPC_WL, OPT_EAX, OPT_REG)) +ALT(DEF_ASM_OP2(xchgw, 0x90, 0, OPC_REG | OPC_WL, OPT_REGW, OPT_EAX)) +ALT(DEF_ASM_OP2(xchgw, 0x90, 0, OPC_REG | OPC_WL, OPT_EAX, OPT_REGW)) ALT(DEF_ASM_OP2(xchgb, 0x86, 0, OPC_MODRM | OPC_BWL, OPT_REG, OPT_EA | OPT_REG)) ALT(DEF_ASM_OP2(xchgb, 0x86, 0, OPC_MODRM | OPC_BWL, OPT_EA | OPT_REG, OPT_REG)) -- cgit v1.3.1