From 0fa0946a461addb8f6900b9fe59fe8ce71bcd1b4 Mon Sep 17 00:00:00 2001 From: Andrew Church Date: Sun, 18 Jan 2015 07:04:56 +0900 Subject: [PATCH] Fix vsumsws clobbering input registers and reading from the wrong word. --- rpcs3/Emu/Cell/PPUInterpreter.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index c1ff4a8db1..71e727fedb 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -1930,15 +1930,14 @@ private: } void VSUMSWS(u32 vd, u32 va, u32 vb) { - CPU.VPR[vd].clear(); - - s64 sum = CPU.VPR[vb]._s32[3]; + s64 sum = CPU.VPR[vb]._s32[0]; for (uint w = 0; w < 4; w++) { sum += CPU.VPR[va]._s32[w]; } + CPU.VPR[vd].clear(); if (sum > INT32_MAX) { CPU.VPR[vd]._s32[0] = (s32)INT32_MAX;