From ea0545779acf81a45447aad303b0f0dff9eae3c4 Mon Sep 17 00:00:00 2001 From: Eladash <18193363+elad335@users.noreply.github.com> Date: Thu, 7 Mar 2024 17:28:22 +0200 Subject: [PATCH] SPU: Include BRSL following code in is_exec_code() --- rpcs3/Emu/Cell/SPUThread.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index 1053059d65..385ad28bd0 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -4241,6 +4241,13 @@ bool spu_thread::is_exec_code(u32 addr, std::span ls_ptr, u32 base_add return false; } + if (type == spu_itype::BRSL) + { + // Insert a virtual return-to-next, because it is usually a call + results[1] = addr + 4; + std::swap(results[1], results[0]); + } + break; } default: