Split the monolithic interpreter into cohesive modules: dedicated decoder (decoder.rs) producing 8-byte DecodedInstr; opcode tables (opcode.rs); explicit traps (trap.rs); FPSCR helpers (fpscr.rs); overflow/carry helpers (overflow.rs); a 4 KiB-page-versioned decode cache and basic-block cache (block_cache.rs); and a full VMX/VMX128 implementation (vmx.rs) covering AltiVec + Xenon's 128-bit extensions. Add the parallel-execution substrate behind --parallel: a 7-party phaser (phaser.rs) for round-based barrier sync, ReservationTable (reservation.rs) for guest LL/SC, and the per-HW-thread scheduler core (scheduler.rs) that owns ThreadRefs, runqueues, and pending IRQs. Disassembler is now the single source of truth: disasm.rs gains the full base + extended + VMX128 mnemonic set, with golden JSON fixtures and a disasm_goldens test suite. Add a criterion-style interpreter bench. context.rs grows the per-thread state the new modules need (reservation slot, FPSCR, vector regs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
26 lines
710 B
Rust
26 lines
710 B
Rust
pub mod block_cache;
|
|
pub mod context;
|
|
pub mod decoder;
|
|
pub mod disasm;
|
|
pub mod fpscr;
|
|
pub mod interpreter;
|
|
pub mod opcode;
|
|
pub mod overflow;
|
|
pub mod phaser;
|
|
pub mod reservation;
|
|
pub mod scheduler;
|
|
pub mod trap;
|
|
pub mod vmx;
|
|
|
|
pub use context::PpcContext;
|
|
pub use decoder::decode;
|
|
pub use disasm::{DisasmItem, DisasmText, disassemble, format as disasm_format, iter_disasm};
|
|
pub use opcode::PpcOpcode;
|
|
pub use phaser::{Phaser, PhaserOutcome};
|
|
pub use reservation::ReservationTable;
|
|
pub use scheduler::{
|
|
BlockReason, GuestThread, HwSlot, HwState, MigrationFixup, OrderMode, PcrWriter, RoundOutcome,
|
|
Scheduler, SpawnError, SpawnParams, ThreadRef, HW_THREAD_COUNT, INITIAL_GUEST_TID,
|
|
QUANTUM_DEFAULT,
|
|
};
|