From 6d0f2ae58adf99c0eb79d265a7299b34f41058d4 Mon Sep 17 00:00:00 2001 From: Eladash Date: Thu, 1 Aug 2019 08:10:42 +0300 Subject: [PATCH] ppu interpreter: Improve SRD/SLD --- rpcs3/Emu/Cell/PPUInterpreter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUInterpreter.cpp b/rpcs3/Emu/Cell/PPUInterpreter.cpp index 5b7bf8c1c5..79aed0055e 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.cpp +++ b/rpcs3/Emu/Cell/PPUInterpreter.cpp @@ -3266,7 +3266,7 @@ bool ppu_interpreter::CNTLZW(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::SLD(ppu_thread& ppu, ppu_opcode_t op) { - const u32 n = ppu.gpr[op.rb]; + const u32 n = ppu.gpr[op.rb] & 0x7f; ppu.gpr[op.ra] = UNLIKELY(n & 0x40) ? 0 : ppu.gpr[op.rs] << n; if (UNLIKELY(op.rc)) ppu_cr_set(ppu, 0, ppu.gpr[op.ra], 0); return true; @@ -3985,7 +3985,7 @@ bool ppu_interpreter::SRW(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::SRD(ppu_thread& ppu, ppu_opcode_t op) { - const u32 n = ppu.gpr[op.rb]; + const u32 n = ppu.gpr[op.rb] & 0x7f; ppu.gpr[op.ra] = UNLIKELY(n & 0x40) ? 0 : ppu.gpr[op.rs] >> n; if (UNLIKELY(op.rc)) ppu_cr_set(ppu, 0, ppu.gpr[op.ra], 0); return true;