From a45631c4ca7857ab1fc13a50640a7c31355aa005 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 25 Mar 2018 15:08:44 -0400 Subject: [PATCH] Interpreter_LoadStore: Remove unnecessary casts These aren't necessary as the type being stored into a u32 are of the same signedness and are smaller in data size, so there's no truncation being performed. --- .../Interpreter/Interpreter_LoadStore.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp index c0953275b4..ea816f4a8e 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp @@ -39,7 +39,7 @@ u32 Interpreter::Helper_Get_EA_UX(const UGeckoInstruction inst) void Interpreter::lbz(UGeckoInstruction inst) { - u32 temp = (u32)PowerPC::Read_U8(Helper_Get_EA(inst)); + u32 temp = PowerPC::Read_U8(Helper_Get_EA(inst)); if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI)) rGPR[inst.RD] = temp; } @@ -47,7 +47,7 @@ void Interpreter::lbz(UGeckoInstruction inst) void Interpreter::lbzu(UGeckoInstruction inst) { u32 uAddress = Helper_Get_EA_U(inst); - u32 temp = (u32)PowerPC::Read_U8(uAddress); + u32 temp = PowerPC::Read_U8(uAddress); if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI)) { rGPR[inst.RD] = temp; @@ -161,7 +161,7 @@ void Interpreter::lhau(UGeckoInstruction inst) void Interpreter::lhz(UGeckoInstruction inst) { - u32 temp = (u32)(u16)PowerPC::Read_U16(Helper_Get_EA(inst)); + u32 temp = PowerPC::Read_U16(Helper_Get_EA(inst)); if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI)) { rGPR[inst.RD] = temp; @@ -171,7 +171,7 @@ void Interpreter::lhz(UGeckoInstruction inst) void Interpreter::lhzu(UGeckoInstruction inst) { u32 uAddress = Helper_Get_EA_U(inst); - u32 temp = (u32)(u16)PowerPC::Read_U16(uAddress); + u32 temp = PowerPC::Read_U16(uAddress); if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI)) { rGPR[inst.RD] = temp; @@ -426,7 +426,7 @@ void Interpreter::icbi(UGeckoInstruction inst) void Interpreter::lbzux(UGeckoInstruction inst) { u32 uAddress = Helper_Get_EA_UX(inst); - u32 temp = (u32)PowerPC::Read_U8(uAddress); + u32 temp = PowerPC::Read_U8(uAddress); if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI)) { rGPR[inst.RD] = temp; @@ -436,7 +436,7 @@ void Interpreter::lbzux(UGeckoInstruction inst) void Interpreter::lbzx(UGeckoInstruction inst) { - u32 temp = (u32)PowerPC::Read_U8(Helper_Get_EA_X(inst)); + u32 temp = PowerPC::Read_U8(Helper_Get_EA_X(inst)); if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI)) { rGPR[inst.RD] = temp; @@ -465,7 +465,7 @@ void Interpreter::lhax(UGeckoInstruction inst) void Interpreter::lhbrx(UGeckoInstruction inst) { - u32 temp = (u32)Common::swap16(PowerPC::Read_U16(Helper_Get_EA_X(inst))); + u32 temp = Common::swap16(PowerPC::Read_U16(Helper_Get_EA_X(inst))); if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI)) { rGPR[inst.RD] = temp; @@ -475,7 +475,7 @@ void Interpreter::lhbrx(UGeckoInstruction inst) void Interpreter::lhzux(UGeckoInstruction inst) { u32 uAddress = Helper_Get_EA_UX(inst); - u32 temp = (u32)PowerPC::Read_U16(uAddress); + u32 temp = PowerPC::Read_U16(uAddress); if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI)) { rGPR[inst.RD] = temp;