summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-05-09 16:30:49 +0300
committerOxore <oxore@protonmail.com>2023-05-09 16:30:49 +0300
commitc27faf5e521089a87893961d3098f19e71cef757 (patch)
tree371ac496e38eec83540512361c5111f89d627da4 /main.cpp
parentf0b568d9d710e329da51213dfd53c98b9e49528b (diff)
Refactoring: begin migration to new Arg structures
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index b3e3e4d..3c7f03f 100644
--- a/main.cpp
+++ b/main.cpp
@@ -160,7 +160,13 @@ static void RenderDisassembly(
}
}
const char *const delimiter = node->arguments[0] != '\0' ? " " : "";
- fprintf(output, " %s%s%s", node->mnemonic, delimiter, node->arguments);
+ if (node->opcode != OpCode::kNone) {
+ // New API
+ node->FPrint(output, s);
+ } else {
+ // Old API
+ fprintf(output, " %s%s%s", node->mnemonic, delimiter, node->arguments);
+ }
if (node->has_branch_addr && s.xrefs_to) {
char branch_addr[12]{};
snprintf(branch_addr, sizeof(branch_addr), " .L%08x", node->branch_addr);