From 8f256f1f2ee6a2a49816dd23d26cd120f526bf0b Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 6 Mar 2020 18:31:14 -0800 Subject: 6090 - new instruction: multiply by immediate This is a 3-operand instruction: r32 = rm32 * imm32 It looks like https://c9x.me/x86/html/file_module_x86_id_138.html has a bug, implying the same opcode supports a 2-operand version. I don't see that in the Intel manual pdf, or at alternative sites like https://www.felixcloutier.com/x86/imul Native runs seem to validate my understanding. In the process I also fixed a bug in the existing multiply instruction 0f af: the only flags it sets are OF and CF. The other existing multiply instruction f7 was doing things right. --- 033check_operands.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to '033check_operands.cc') diff --git a/033check_operands.cc b/033check_operands.cc index 04492986..28a7458e 100644 --- a/033check_operands.cc +++ b/033check_operands.cc @@ -246,6 +246,11 @@ void init_permitted_operands() { put(Permitted_operands, "81", 0x43); // combine put(Permitted_operands, "c7", 0x43); // copy + //// Class Q: op, ModR/M and imm32 + // imm32 imm8 disp32 |disp16 disp8 subop modrm + // 1 0 0 |0 0 0 1 + put(Permitted_operands, "69", 0x41); // multiply + // End Init Permitted Operands } -- cgit 1.4.1-2-gfad0