From 9fd2eba95beb6c9ce6fb26e1442aa2f68aac9b1f Mon Sep 17 00:00:00 2001 From: Oxore Date: Sun, 4 Feb 2024 19:51:35 +0300 Subject: Impl deep graph walk and distinct jump following option This commit changes the default behavior which technically breaks backwards compatibility. It would be a concern if somebody else besides me is using this tool, but I doubt it would be the case, LOL. --- disasm.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'disasm.cpp') diff --git a/disasm.cpp b/disasm.cpp index ed30f4b..2b2ea81 100644 --- a/disasm.cpp +++ b/disasm.cpp @@ -1573,19 +1573,14 @@ static size_t m68k_disasm(DisasmNode &n, uint16_t i, const DataView &c) size_t DisasmNode::Disasm(const DataView &code) { - // We assume that machine have no MMU and ROM data always starts with 0 + // We assume that machine have no MMU and ROM data always starts at 0 assert(this->address < code.size); - // It is possible to have multiple DisasmNode::Disasm() calls, and there is - // no point to disassemble it again if it already has opcode determined - if (this->op.opcode != OpCode::kNone) { - return this->size; - } size = kInstructionSizeStepBytes; ref_kinds = 0; ref1_addr = 0; ref2_addr = 0; const uint16_t instr = GetU16BE(code.buffer + this->address); - if (this->type == TracedNodeType::kInstruction) { + if (IsInstruction(this->type)) { return m68k_disasm(*this, instr, code); } else { // Data should not be disassembled @@ -1595,7 +1590,7 @@ size_t DisasmNode::Disasm(const DataView &code) size_t DisasmNode::DisasmAsRaw(const DataView &code) { - // We assume that machine have no MMU and ROM data always starts with 0 + // We assume that machine have no MMU and ROM data always starts at 0 assert(this->address < code.size); size = kInstructionSizeStepBytes; ref_kinds = 0; -- cgit v1.2.3