PlayAgain 0106 (harness only): wasm blocks compiled only for block starts in a range, for bisecting a JIT-on/JIT-off digest difference down to a block (design J0 item 5's next step). SPDX-License-Identifier: GPL-2.0-or-later Tree: vendor/dolphin (after 0105). What: DolphinWeb_PaJitRangeForTest(lo, hi): TryWriteWasmBlock leaves a block whose start is outside [lo, hi) to the cached interpreter's callbacks, as with the JIT off. Default [0, 2^32): every block, so a player's session never sees it (one compare per compile attempt). Switch: none needed (default everything); set by the worker's validationPaJitRange (0106-fork), which dw/source/harness/replay.mjs --jitrange LO-HI sends before the state load. --- a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp +++ b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp @@ -13090,6 +13090,17 @@ return 0; } return sizeof(AnyCallback) + sizeof(operands); +} + +// PlayAgain 0106 (harness only): compile wasm blocks only for block starts in [lo, hi), the rest +// left to the cached interpreter (DolphinWeb_PaJitRangeForTest, the worker's validationPaJitRange; +// default everything). For bisecting a JIT-on/JIT-off digest difference down to a block. +u32 s_pa_jit_range_lo = 0; +u32 s_pa_jit_range_hi = 0xffffffffu; +extern "C" EMSCRIPTEN_KEEPALIVE void DolphinWeb_PaJitRangeForTest(u32 lo, u32 hi) +{ + s_pa_jit_range_lo = lo; + s_pa_jit_range_hi = hi; } bool CachedInterpreter::TryWriteWasmBlock(u32 nextPC) @@ -13119,6 +13130,9 @@ return false; if (!s_wasm_jit_enabled || s_wasm_table_full.load(std::memory_order_relaxed)) return false; + // PlayAgain 0106 (harness only): wasm blocks only for block starts in the bisection range. + if (js.blockStart < s_pa_jit_range_lo || js.blockStart >= s_pa_jit_range_hi) + return false; if (IsProfilingEnabled()) {