RISC-V and LoongArch64 IR JITs: Name the fixed code routines, and profile on Linux

Both now list their routines (GetFixedCodeLabels), so the disassembly
names jump targets and --jit-profile charges routine samples to the
calling block. The profiler samples them on Linux, and its report
disassembles their host code per instruction (RISC-V's in 2- and 4-byte
steps).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-15 15:17:50 +02:00
1 parent 08b398bbd1
commit d4a2cd3e43
7 files changed
+55 -2

No files matched your search

+17
View File
@@ -656,6 +656,23 @@ static std::vector<std::string> DisassembleHost(const u8 *p, int size, std::vect
}
#elif PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64)
lines = DisassembleX86(p, size, &offsets);
#elif PPSSPP_ARCH(RISCV64)
for (int i = 0; i + 2 <= size; ) {
// Compressed instructions are 2 bytes.
const int len = (p[i] & 3) == 3 ? 4 : 2;
if (i + len > size)
break;
std::vector<std::string> one = DisassembleRV64(p + i, len);
lines.push_back(one.empty() ? "?" : one[0]);
offsets.push_back(i);
i += len;
}
#elif PPSSPP_ARCH(LOONGARCH64)
for (int i = 0; i + 4 <= size; i += 4) {
std::vector<std::string> one = DisassembleLA64(p + i, 4);
lines.push_back(one.empty() ? "?" : one[0]);
offsets.push_back(i);
}
#else
lines.push_back("(no per-instruction disassembly for this host)");
offsets.push_back(0);