From 5692716770e9e2e733d0e7ab6ce0bd70cb830aba Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 11 Jul 2016 21:41:15 +0200 Subject: x86-asm: Fix lar opcode operands lar can accept multiple sizes as well (wlx), like lsl. When using autosize it's important to look at the destination operand first; when it's a register that one determines the size, not the input operand. --- x86_64-asm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'x86_64-asm.h') diff --git a/x86_64-asm.h b/x86_64-asm.h index 73a9f57..5855d2a 100644 --- a/x86_64-asm.h +++ b/x86_64-asm.h @@ -359,7 +359,7 @@ ALT(DEF_ASM_OP1(fstsw, 0xdd, 7, OPC_MODRM | OPC_FWAIT, OPT_EA )) /* segments */ DEF_ASM_OP2(arpl, 0x63, 0, OPC_MODRM, OPT_REG16, OPT_REG16 | OPT_EA) - DEF_ASM_OP2(lar, 0x0f02, 0, OPC_MODRM, OPT_REG32 | OPT_EA, OPT_REG32) +ALT(DEF_ASM_OP2(larw, 0x0f02, 0, OPC_MODRM | OPC_WLX, OPT_REG | OPT_EA, OPT_REG)) DEF_ASM_OP1(lgdt, 0x0f01, 2, OPC_MODRM, OPT_EA) DEF_ASM_OP1(lgdtq, 0x0f01, 2, OPC_MODRM, OPT_EA) DEF_ASM_OP1(lidt, 0x0f01, 3, OPC_MODRM, OPT_EA) -- cgit v1.3.1