Skip to content

JIT stabilization#11

Merged
techomancer merged 9 commits intotechomancer:mainfrom
unxmaal:jit_stabilization
Apr 16, 2026
Merged

JIT stabilization#11
techomancer merged 9 commits intotechomancer:mainfrom
unxmaal:jit_stabilization

Conversation

@unxmaal
Copy link
Copy Markdown
Contributor

@unxmaal unxmaal commented Apr 16, 2026

Core JIT improvements:

  • Three-tier JIT (ALU → Loads → Full) with adaptive probe, block chaining (max 32 instrs),
    tier promotion/demotion
  • Speculative execution as safety net — all compiled blocks are load-only and speculative,
    catching Cranelift regalloc2 codegen errors via rollback+demotion
  • Full-tier blocks terminate before stores (stores go to interpreter)
  • Branch-likely instructions (BEQL/BNEL/BLEZL/BGTZL + REGIMM variants) with conditional
    delay-slot nullification via select
  • ADDI/DADDI compiled as ADDIU/DADDIU (overflow trap ignored)
  • Cross-session profile persistence — deferred lazy replay, kernel-only save, content hash
    validation, boot-settle detection

Infrastructure:

  • jit-diag.sh — diagnostic test harness with COW overlays
  • codegen_test.rs — standalone regression test suite (1587 lines)
  • trace.rs + tools/diff-trace.py — binary trace + differential debugging
  • rules/jit/ — 9 rule files documenting hard-won invariants

Result: ~11% JIT coverage, stable IRIX 6.5 desktop (4dwm), ~2.5× throughput vs
interpreter-only.

@techomancer techomancer merged commit f031d9a into techomancer:main Apr 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants