From c65bb0d267e1d25e08ec0fe2c37332c8bd0a42d6 Mon Sep 17 00:00:00 2001 From: Eladash Date: Sat, 21 Dec 2019 09:12:14 +0200 Subject: [PATCH] Avoid shifting by greater/equal than max bits values in ppu_rotate_mask --- rpcs3/Emu/Cell/PPUOpcodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/PPUOpcodes.h b/rpcs3/Emu/Cell/PPUOpcodes.h index 397294d64a..e221fed15b 100644 --- a/rpcs3/Emu/Cell/PPUOpcodes.h +++ b/rpcs3/Emu/Cell/PPUOpcodes.h @@ -64,7 +64,7 @@ union ppu_opcode_t inline u64 ppu_rotate_mask(u32 mb, u32 me) { - return utils::ror64(~0ull << (63 ^ (me - mb)), mb); + return utils::ror64(~0ull << (~(me - mb) & 63), mb); } inline u32 ppu_decode(u32 inst)