From 4ae333513e892ce94d02a08682d02454bd3d12d7 Mon Sep 17 00:00:00 2001 From: mykola2312 <49044616+mykola2312@users.noreply.github.com> Date: Mon, 19 Aug 2024 01:32:50 +0300 Subject: [PATCH] fix typo which led to bug with opreg decoding --- src/rtdisasm.c | 2 +- src/rtdisasm_test_data.s | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rtdisasm.c b/src/rtdisasm.c index e2f4061..05f6c49 100644 --- a/src/rtdisasm.c +++ b/src/rtdisasm.c @@ -100,7 +100,7 @@ static const instruction_t* find_instruction(const uint8_t* cur, unsigned type, continue; } - if (ins->config.has_modrm) + if (ins->config.has_opreg) { // instruction encoding employs register embedded into last opcode byte // so we need to apply bit mask diff --git a/src/rtdisasm_test_data.s b/src/rtdisasm_test_data.s index 7e19828..b535e40 100644 --- a/src/rtdisasm_test_data.s +++ b/src/rtdisasm_test_data.s @@ -3,8 +3,7 @@ .globl test_1_end test_1: - lock - mov %gs:(%rbx), %rax + push %rbp nop # target that rtdisasm must reach test_1_end: