Commit Graph
17 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 39e6e7b29b IR JITs: Split the IR interpreter out, and keep IR to it
IRJit is now the base the IR JITs share: the frontend, the table of guest
blocks, and compiling and invalidating them. IRInterpreterJit and
IRNativeJit are the two kinds. Only IRInterpreterJit keeps IR, in its arena,
along with its dispatch loop and per-block profile.

The native JITs no longer keep the IR they compiled from. The debugger and
the --jit-profile report compile a native block's IR again when they want it,
on a copy of the frontend's state, which gives what ran unless the code or
that state has changed since.

IRBlockCache and IRBlock become JitBlockTable and JitBlock: where each block
came from, the page lookup for invalidation, and the block shadow entry (an
arena or native code offset, depending on the JIT). One IRJitDebugInterface
serves both JITs, taking the MIPS code from the table and the IR and host code
from the JIT, in place of the native JIT's own debug interface.

The native backends don't see the table at all. They compile a span of IR for
a block number and start PC, and keep what they need about their own blocks
(start PC, code offset, which block starts where, for linking) next to the
exits they already tracked. The register cache takes the instructions
directly.

The tracer's block index now goes into the IR before the block is stored, so
native blocks get it too. The unused FindByCookie goes. TestJit checks that
the native JIT keeps no IR, and can still show it. The JIT stats overlay no
longer shows IR for the native JITs. MIPSState can't be copied, now that it
owns its JIT.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 12:09:16 +02:00
Henrik RydgårdandClaude Opus 5 b03bbdbca3 MIPSTracer: don't index trace_info with stale block indices
flush_to_file() ends with clear(), but tracing stays on and the blocks
already compiled keep the index baked into their LogIRBlock instruction.
A second flush then indexed an emptied trace_info out of bounds.

Skip indices that no longer refer to anything and say so in the log, and
give the LogIRBlock placeholder an explicit invalid index so a block that
prepare_block failed to record doesn't dump block 0 instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 10:02:54 -06:00
刘皓 5716cbd41d Use the libretro VFS interface in libretro builds 2026-01-01 00:24:01 -05:00
Henrik Rydgård c5a4023d90 Warning fixes 2024-09-24 13:28:28 +02:00
Henrik Rydgård 5a6c76720d Remove double ampersands from PPGe-drawn text (in-game UI) 2024-09-22 09:28:48 +02:00
Nemoumbra 4477c9bc66 Removed mentions of MIPSLogger, improved the logs 2024-09-20 17:09:39 +03:00
Nemoumbra bd6c469543 Code-review fixes 2024-09-16 02:48:52 +03:00
Nemoumbra 21d0f596ec Cleaned up the includes 2024-09-14 19:57:39 +03:00
Nemoumbra c1ad3db1d8 Switched to PPSSPP's C file-stream API 2024-09-14 19:46:05 +03:00
Nemoumbra 01b3b59d06 Bugs fixed + enabled MIPSTracer on Mac, desktop Linux and OpenBDS 2024-09-14 19:46:05 +03:00
Nemoumbra ab7af0cc19 Minor cleanup, new UI button 2024-09-14 19:46:05 +03:00
Nemoumbra f23b04fb4a Logic errors fixed + refactoring 2024-09-14 19:46:05 +03:00
Nemoumbra ff5877e993 Renamed the IR instruction, new UI button added 2024-09-14 19:46:05 +03:00
Nemoumbra a26afb4c2f Implemented the trace reconstruction + bugs fixed 2024-09-14 19:46:05 +03:00
Nemoumbra 25f6b01d86 Added the initialization code + UI bindings + logs 2024-09-14 19:46:05 +03:00
Nemoumbra e3b09bea59 Ported the MIPSLogger's UI + basic integration of MIPSTracer 2024-09-14 19:46:05 +03:00
Nemoumbra 854579a97b Initial code for the tracer + fixed the file locations 2024-09-14 19:46:04 +03:00