From 78c827b13157faa19649aa4dfa82b631bd8a53d1 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Tue, 22 Jul 2025 23:46:13 +0100 Subject: [PATCH] Convert bit operation --- intel.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/intel.c b/intel.c index 87ac268..cd0c35d 100644 --- a/intel.c +++ b/intel.c @@ -6311,6 +6311,18 @@ void machine_dependent_assemble_line (char *start, char *line) { return; } + if (current_templates[0].start->base_opcode == 0xC0 && instruction.operands == 2) { + + if (instruction.types[1].imm8 || instruction.types[1].imm8s || instruction.types[1].imm16 || instruction.types[1].imm32 || instruction.types[1].imm32s || instruction.types[1].imm64) { + + if (instruction.imms[1]->type == EXPR_TYPE_CONSTANT && instruction.imms[1]->add_number == 1) { + instruction.operands--; + } + + } + + } + /** * All Intel instructions have reversed operands except "bound" and some other. * "ljmp" and "lcall" with 2 immediate operands also do not have operands reversed. -- 2.34.1