From 2594d7fd14f4692aeae8f1c94836bd3187c52cc2 Mon Sep 17 00:00:00 2001 From: Oxore Date: Tue, 16 May 2023 01:33:11 +0300 Subject: Impl separately enabled absolute and relative relocations --- disasm.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'disasm.h') diff --git a/disasm.h b/disasm.h index 4f0ef9f..98b6fb6 100644 --- a/disasm.h +++ b/disasm.h @@ -297,7 +297,7 @@ struct Arg { int SNPrint( char *buf, size_t bufsz, - bool has_relocation = false, + unsigned relocation = 0, uint32_t self_addr = 0, uint32_t reloc_addr = 0) const; }; @@ -350,7 +350,7 @@ struct Op { } int FPrint( FILE *, - bool has_relocation = false, + unsigned relocation = 0, uint32_t self_addr = 0, uint32_t reloc_addr = 0) const; }; @@ -361,10 +361,10 @@ struct DisasmNode { const uint32_t offset{}; /// Instruction size in bytes size_t size{kInstructionSizeStepBytes}; - /// Indicates whether `branch_addr` should be interpreted - bool has_branch_addr{}; + /// Indicates whether `reloc_addr` should be interpreted and how + bool has_relocation{}; /// Absolute address of where to branch to - uint32_t branch_addr{}; + uint32_t reloc_addr{}; /// Indicates whether instruction is a call (BSR, JSR) or just a branch /// (Bcc, JMP) if `has_branch_addr` is set bool is_call{}; -- cgit v1.2.3