diff --git a/src/dasm_cache/dasm_cache.c b/src/dasm_cache/dasm_cache.c index 5ed5ef15..f0c6a411 100644 --- a/src/dasm_cache/dasm_cache.c +++ b/src/dasm_cache/dasm_cache.c @@ -41,7 +41,14 @@ dasm_inst_from_code(Arena *arena, Arch arch, U64 vaddr, String8 code, DASM_Synta ZydisDecodedOperand *first_visible_op = (zinst.info.operand_count_visible > 0 ? &zinst.operands[0] : 0); ZydisDecodedOperand *first_op = (zinst.info.operand_count > 0 ? &zinst.operands[0] : 0); ZydisDecodedOperand *second_op = (zinst.info.operand_count > 1 ? &zinst.operands[1] : 0); - if(first_visible_op != 0) + if(first_visible_op != 0 && + (first_visible_op->encoding == ZYDIS_OPERAND_ENCODING_JIMM8 || + first_visible_op->encoding == ZYDIS_OPERAND_ENCODING_JIMM16 || + first_visible_op->encoding == ZYDIS_OPERAND_ENCODING_JIMM32 || + first_visible_op->encoding == ZYDIS_OPERAND_ENCODING_JIMM64 || + first_visible_op->encoding == ZYDIS_OPERAND_ENCODING_JIMM16_32_64 || + first_visible_op->encoding == ZYDIS_OPERAND_ENCODING_JIMM32_32_64 || + first_visible_op->encoding == ZYDIS_OPERAND_ENCODING_JIMM16_32_32)) { ZydisCalcAbsoluteAddress(&zinst.info, first_visible_op, vaddr, &jump_dest_vaddr); } diff --git a/src/task_system/task_system.c b/src/task_system/task_system.c index 30b97cf7..bbc0d5af 100644 --- a/src/task_system/task_system.c +++ b/src/task_system/task_system.c @@ -1,3 +1,6 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + //////////////////////////////// //~ rjf: Basic Type Functions