From c48ae344a8a2b5266eb2a733a53ccd2af4b8f28b Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Sat, 29 Nov 2025 07:43:50 +0200 Subject: [PATCH] SPU LLVM (Mega): Fix quarter of missing jumptable discoveries --- rpcs3/Emu/Cell/SPUCommonRecompiler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp index e3455fcb2d..2a792f677e 100644 --- a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp @@ -3165,6 +3165,15 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s break; } + if (target >= SPU_LS_SIZE && target <= 0u - SPU_LS_SIZE) + { + if (g_spu_itype.decode(target) != spu_itype::UNK) + { + // End of jumptable: valid instruction + break; + } + } + if (target >= lsa && target < SPU_LS_SIZE) { // Possible jump table entry (absolute)