You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iOS: Compile EI/ERET as block terminators and live-cycle COP0 Count/PERF
Port the COP0 block-terminator and live-cycle handling from the mac arm64
backend (upstream 673135b) so EI/ERET and the MFC0/MTC0 Count/PERF
polls no longer force an interpreter single-step block.
EI (enable interrupts) and ERET (exception return) are now compiled as
in-block terminators matching x86 recEI/recERET: run the interpreter
handler inline (Interp::EI sets Status.EIE; Interp::ERET writes
cpuRegs.pc), then end the block so the tail event-tests and dispatches
from cpuRegs.pc. This keeps the preceding straight-line ops in the same
block and lets the block's cycles ride forward to the post-loop commit
instead of fragmenting the block around every EI/ERET.
MFC0/MTC0 of Count(rd9)/PERF(rd25) commit the block's accumulated cycles
before an inline interpreter call (so the read sees a live cpuRegs.cycle)
rather than single-stepping. Games busy-poll Count for timing and these
were ~80% of Jackie Chan Adventures' EE fallbacks; the per-op commit
also fixes the stale-value hazard where two Count reads in one block
returned the same value.
Correctness is inherited from the interpreter handlers; no native COP0
emitter is needed. Both paths are inserted in recRecompile before the
recTranslateOpOptimized straight-line fallback.
0 commit comments