From bf0425f057117c778ac8ec6a4286e6c14ea6319f Mon Sep 17 00:00:00 2001 From: Alexis Engelke Date: Mon, 13 Sep 2021 17:38:24 +0200 Subject: [PATCH] decode: Expose immediate in RVMR encodings The AMD64 instructions VPERMIL2PS and VPERMIL2PD (currently not supported) encode a fifth immediate operand in the lower bits of the re-purposed immediate. Expose this value in any case so that no information gets lost during decoding. --- decode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/decode.c b/decode.c index 31c37b2..92a2f7e 100644 --- a/decode.c +++ b/decode.c @@ -485,6 +485,7 @@ skip_modrm: if (mode == DECODE_32) reg &= 0x7f; operand->reg = reg >> 4; + instr->imm = reg & 0x0f; } else if (imm_control != 0) {