summaryrefslogtreecommitdiff
path: root/disasm.cpp
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-05-25 23:30:08 +0300
committerOxore <oxore@protonmail.com>2023-05-25 23:32:10 +0300
commitb5505144c731ae992c17a5efdf53410994fdcb11 (patch)
treeb1b5c8185b7c2abdc2ec7b3c0fbe64da8cb79292 /disasm.cpp
parent475413c7bf6b9861660e1616d03ad038def435b0 (diff)
Impl exporting functions and marks
Diffstat (limited to 'disasm.cpp')
-rw-r--r--disasm.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/disasm.cpp b/disasm.cpp
index 09a5149..dba933a 100644
--- a/disasm.cpp
+++ b/disasm.cpp
@@ -1857,11 +1857,11 @@ int Arg::SNPrint(
const char c = type == ArgType::kLong ? 'l' : 'w';
if (ref_kinds & kRefAbsMask) {
if (static_cast<uint32_t>(lword) == ref_addr) {
- return snprintf(buf, bufsz, ".L%08x:%c", ref_addr, c);
+ return snprintf(buf, bufsz, "L%08x:%c", ref_addr, c);
} else {
// It has to be AFTER the mark we are gonna reference here
assert(static_cast<uint32_t>(lword) > ref_addr);
- return snprintf(buf, bufsz, ".L%08x+%d:%c", ref_addr, lword - ref_addr, c);
+ return snprintf(buf, bufsz, "L%08x+%d:%c", ref_addr, lword - ref_addr, c);
}
} else {
return snprintf(buf, bufsz, "0x%x:%c", lword, c);
@@ -1874,10 +1874,10 @@ int Arg::SNPrint(
const bool has_fix = ref_kinds & kRefPcRelFix2Bytes;
const uint32_t arg_addr = self_addr + d16_pc.d16 + kInstructionSizeStepBytes + (has_fix ? kInstructionSizeStepBytes : 0);
if (arg_addr == ref_addr) {
- return snprintf(buf, bufsz, "%%pc@(.L%08x:w)", ref_addr);
+ return snprintf(buf, bufsz, "%%pc@(L%08x:w)", ref_addr);
} else {
assert(arg_addr > ref_addr);
- return snprintf(buf, bufsz, "%%pc@(.L%08x+%d:w)", ref_addr, arg_addr - ref_addr);
+ return snprintf(buf, bufsz, "%%pc@(L%08x+%d:w)", ref_addr, arg_addr - ref_addr);
}
} else {
return snprintf(buf, bufsz, "%%pc@(%d:w)", d16_pc.d16);
@@ -1892,11 +1892,11 @@ int Arg::SNPrint(
case ArgType::kImmediate:
if (ref_kinds & kRef1ImmMask) {
if (static_cast<uint32_t>(lword) == ref_addr) {
- return snprintf(buf, bufsz, "#.L%08x", ref_addr);
+ return snprintf(buf, bufsz, "#L%08x", ref_addr);
} else {
// It has to be AFTER the mark we are gonna reference here
assert(static_cast<uint32_t>(lword) > ref_addr);
- return snprintf(buf, bufsz, "#.L%08x+%d", ref_addr, lword - ref_addr);
+ return snprintf(buf, bufsz, "#L%08x+%d", ref_addr, lword - ref_addr);
}
} else if (imm_as_hex) {
return snprintf(buf, bufsz, "#0x%x", lword);
@@ -1909,10 +1909,10 @@ int Arg::SNPrint(
case ArgType::kDisplacement:
if (ref_kinds & kRefRelMask) {
if (static_cast<uint32_t>(self_addr + lword) == ref_addr) {
- return snprintf(buf, bufsz, ".L%08x", ref_addr);
+ return snprintf(buf, bufsz, "L%08x", ref_addr);
} else {
assert(static_cast<uint32_t>(self_addr + lword) > ref_addr);
- return snprintf(buf, bufsz, ".L%08x+%d", ref_addr, (self_addr + lword) - ref_addr);
+ return snprintf(buf, bufsz, "L%08x+%d", ref_addr, (self_addr + lword) - ref_addr);
}
} else {
return snprintf(buf, bufsz, ".%s%d", lword >= 0 ? "+" : "", lword);