From 7e825fdca5fd9a6eb6da455d14719bbe272fdf45 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 28 Sep 2014 13:28:16 -0400 Subject: [PATCH] Jit_Integer: Get rid of some cast noise in boolX --- .../Core/Core/PowerPC/Jit64/Jit_Integer.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index 4136a89621..b2bf7e6690 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -562,22 +562,25 @@ void Jit64::boolX(UGeckoInstruction inst) if (gpr.R(s).IsImm() && gpr.R(b).IsImm()) { + const u32 rs_offset = static_cast(gpr.R(s).offset); + const u32 rb_offset = static_cast(gpr.R(b).offset); + if (inst.SUBOP10 == 28) // andx - gpr.SetImmediate32(a, (u32)gpr.R(s).offset & (u32)gpr.R(b).offset); + gpr.SetImmediate32(a, rs_offset & rb_offset); else if (inst.SUBOP10 == 476) // nandx - gpr.SetImmediate32(a, ~((u32)gpr.R(s).offset & (u32)gpr.R(b).offset)); + gpr.SetImmediate32(a, ~(rs_offset & rb_offset)); else if (inst.SUBOP10 == 60) // andcx - gpr.SetImmediate32(a, (u32)gpr.R(s).offset & (~(u32)gpr.R(b).offset)); + gpr.SetImmediate32(a, rs_offset & (~rb_offset)); else if (inst.SUBOP10 == 444) // orx - gpr.SetImmediate32(a, (u32)gpr.R(s).offset | (u32)gpr.R(b).offset); + gpr.SetImmediate32(a, rs_offset | rb_offset); else if (inst.SUBOP10 == 124) // norx - gpr.SetImmediate32(a, ~((u32)gpr.R(s).offset | (u32)gpr.R(b).offset)); + gpr.SetImmediate32(a, ~(rs_offset | rb_offset)); else if (inst.SUBOP10 == 412) // orcx - gpr.SetImmediate32(a, (u32)gpr.R(s).offset | (~(u32)gpr.R(b).offset)); + gpr.SetImmediate32(a, rs_offset | (~rb_offset)); else if (inst.SUBOP10 == 316) // xorx - gpr.SetImmediate32(a, (u32)gpr.R(s).offset ^ (u32)gpr.R(b).offset); + gpr.SetImmediate32(a, rs_offset ^ rb_offset); else if (inst.SUBOP10 == 284) // eqvx - gpr.SetImmediate32(a, ~((u32)gpr.R(s).offset ^ (u32)gpr.R(b).offset)); + gpr.SetImmediate32(a, ~(rs_offset ^ rb_offset)); } else if (s == b) {