From e938b93f487532200d68d75d2bf15af6730e1a08 Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Sat, 29 Nov 2025 18:47:45 +0200 Subject: [PATCH] SPU Analyzer: Ignore large switch state --- rpcs3/Emu/Cell/SPUCommonRecompiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp index 2a792f677e..c9d784d3ac 100644 --- a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp @@ -8435,8 +8435,9 @@ std::array& block_reg_info::evaluate_start_state(const s { // TODO: The true maximum occurence count need to depend on the amount of branching-outs passed through // Currently allow 2 for short-term code and 1 for long-term code + // Ignore large jumptables as well const bool loop_terminator_detected = std::count(been_there.begin(), been_there.end(), prev_pc) >= (qi < 20 ? 2u : 1u); - const bool avoid_extensive_analysis = qi >= (extensive_evaluation ? 22 : 16); + const bool avoid_extensive_analysis = qi >= (extensive_evaluation ? 22 : 16) || it->state_prev.size() >= 8; if (!loop_terminator_detected && !avoid_extensive_analysis) {