This repository has been archived on 2026-09-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
xenia-rs/Cargo.toml
MechaCat02 1d56218d83 [iterate-4C] JIT Phase 0: dynasm skeleton (all-fallback, golden byte-identical)
New crate `xenia-jit` — the PPC->x64 block-JIT runtime substrate, behind
default-OFF XENIA_JIT. Phase 0 ports ZERO opcodes to native: every guest
instruction is emitted as `call jit_interpret_one` (the interpreter), so a
JIT-compiled block is byte-identical to step_block by construction. This
proves the ABI/counters/exit-semantics/mem-helpers/code-cache before any
opcode is hand-written.

- JitEnv{ctx, mem (fat raw ptr), last_result}; compiled block =
  extern "C" fn(*mut JitEnv)->u32 (StepResult discriminant, 0=Continue).
  Emitted code pins ctx in r15 + env in rbx (callee-saved across calls),
  offsets via offset_of!.
- Determinism postlude: cycle_count/timebase +=1 after every retired
  instruction; block stops at the same instruction as the interpreter
  (non-Continue result, or taken-branch pc discontinuity).
- Per-slot JitCache mirrors BlockCache's (start_pc, page_version) gate;
  each CompiledBlock OWNS a copy of its decoded instrs so baked instr
  pointers can't dangle after a block-cache eviction.
- xenia-cpu: `pub fn interpret_one` (execute without the cycle bump — the
  JIT owns counting).
- Seam: run_superblock main.rs:3154 dispatches to the JIT when enabled;
  WorkerCtx gains an Option<JitCache> (Some only when XENIA_JIT set and
  RET-CAPTURE debug env unset). observe_per_instruction gate unchanged, so
  tooling runs never reach the JIT.

Gate: golden n200m BYTE-IDENTICAL both with and without XENIA_JIT=1.
Throughput -n 200M --gpu-inline: 4.5s interp vs 7.1s all-fallback skeleton
(the per-instruction call overhead Phase 1 removes for hot opcodes).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 23:38:28 +02:00

70 lines
1.9 KiB
TOML

[workspace]
resolver = "2"
members = [
"crates/xenia-types",
"crates/xenia-memory",
"crates/xenia-cpu",
"crates/xenia-jit",
"crates/xenia-xex",
"crates/xenia-vfs",
"crates/xenia-kernel",
"crates/xenia-gpu",
"crates/xenia-apu",
"crates/xenia-hid",
"crates/xenia-debugger",
"crates/xenia-analysis",
"crates/xenia-ui",
"crates/xenia-app",
]
[workspace.package]
version = "0.1.0"
edition = "2024"
license = "BSD-3-Clause"
[workspace.dependencies]
# Shared types
xenia-types = { path = "crates/xenia-types" }
xenia-memory = { path = "crates/xenia-memory" }
xenia-cpu = { path = "crates/xenia-cpu" }
xenia-jit = { path = "crates/xenia-jit" }
xenia-xex = { path = "crates/xenia-xex" }
xenia-vfs = { path = "crates/xenia-vfs" }
xenia-kernel = { path = "crates/xenia-kernel" }
xenia-gpu = { path = "crates/xenia-gpu" }
xenia-apu = { path = "crates/xenia-apu" }
xenia-hid = { path = "crates/xenia-hid" }
xenia-debugger = { path = "crates/xenia-debugger" }
xenia-analysis = { path = "crates/xenia-analysis" }
xenia-ui = { path = "crates/xenia-ui" }
# External dependencies
# JIT (PPC->x64 block recompiler; runtime-gated by XENIA_JIT)
dynasm = "3"
dynasmrt = "3"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json", "registry"] }
tracing-appender = "0.2"
tracing-chrome = "0.7"
tracing-error = "0.2"
metrics = "0.24"
metrics-util = "0.19"
pprof = { version = "0.14", features = ["flamegraph", "protobuf-codec"] }
bitflags = "2"
byteorder = "1"
thiserror = "2"
anyhow = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
aes = "0.8"
duckdb = { version = "1", features = ["bundled"] }
# UI / rendering / input (used by xenia-ui and xenia-app with --ui)
winit = "0.30"
wgpu = "22"
gilrs = "0.11"
pollster = "0.3"
crossbeam-utils = "0.8"
crossbeam-channel = "0.5"
bytemuck = { version = "1", features = ["derive"] }