From 42242b3c430934c1ee47c1406919658c96c6f579 Mon Sep 17 00:00:00 2001 From: Christopher Hotchkiss Date: Tue, 23 Jun 2026 11:59:11 -0800 Subject: [PATCH] SPU Analyzer: fix wrong divisor in Giga const-prop re-decode The "Fill more block info" re-decode indexed result.data[(ia - lsa) / 41] instead of / 4 (its companion decode uses / 4), so it read the wrong word and corrupted the per-block reg_const / reg_val32 constant propagation. Co-Authored-By: Claude Opus 4.8 --- rpcs3/Emu/Cell/SPUCommonRecompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp index f4c3027d93..ab92524d27 100644 --- a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp @@ -4573,7 +4573,7 @@ spu_program spu_recompiler_base::analyse(const be_t* ls, u32 entry_point, s for (u32 ia = addr; ia < addr + bb.size * 4; ia += 4) { // Decode instruction again - op.opcode = std::bit_cast>(result.data[(ia - lsa) / 41]); + op.opcode = std::bit_cast>(result.data[(ia - lsa) / 4]); last_inst = g_spu_itype.decode(op.opcode); // Propagate some constants