From ae30cb5557aa4ba85376f6dcdab430f76a679d40 Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Thu, 23 Oct 2025 17:27:06 +0300 Subject: [PATCH] SaveStates/SPU-LLVM: Fix SPU Access Violations on load --- rpcs3/Emu/Cell/SPUDisAsm.cpp | 2 +- rpcs3/Emu/Cell/SPULLVMRecompiler.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/SPUDisAsm.cpp b/rpcs3/Emu/Cell/SPUDisAsm.cpp index 9529babb41..645a79969f 100644 --- a/rpcs3/Emu/Cell/SPUDisAsm.cpp +++ b/rpcs3/Emu/Cell/SPUDisAsm.cpp @@ -15,7 +15,7 @@ u32 SPUDisAsm::disasm(u32 pc) { last_opcode.clear(); - if (!m_shm || pc < m_start_pc || pc >= SPU_LS_SIZE) + if (pc < m_start_pc || pc >= SPU_LS_SIZE) { return 0; } diff --git a/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp b/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp index fa1d782ee4..b275773e8b 100644 --- a/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPULLVMRecompiler.cpp @@ -2231,6 +2231,12 @@ public: { for (auto& [a, b] : m_blocks) { + if (has_gpr_memory_barriers) + { + // Dive deeper and inspect GPR store barriers + break; + } + // Check if the store occurs before any barrier in the block if (b.store[i] && b.store[i] != bs && b.store_context_first_id[i] == 1) {