From a248e49c97d5d01a06ac1e8aadb7a221a94e4de9 Mon Sep 17 00:00:00 2001 From: Fiora Date: Mon, 15 Sep 2014 07:01:51 -0700 Subject: [PATCH] Revert "Two small JIT optimizations" --- Source/Core/Core/PowerPC/Jit64/Jit.h | 2 +- Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp | 10 +++------- Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp | 4 +++- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.h b/Source/Core/Core/PowerPC/Jit64/Jit.h index e006286ff4..53a846237f 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.h +++ b/Source/Core/Core/PowerPC/Jit64/Jit.h @@ -103,7 +103,7 @@ public: void FinalizeCarryOverflow(bool oe, bool inv = false); void FinalizeCarry(Gen::CCFlags cond); void FinalizeCarry(bool ca); - void ComputeRC(const Gen::OpArg & arg, bool sign_extend = true); + void ComputeRC(const Gen::OpArg & arg); // Use to extract bytes from a register using the regcache. offset is in bytes. Gen::OpArg ExtractFromReg(int reg, int offset); diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index 57e9434f08..dbb6a5fbf1 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -116,21 +116,17 @@ void Jit64::FinalizeCarryOverflow(bool oe, bool inv) FinalizeCarry(inv ? CC_NC : CC_C); } -void Jit64::ComputeRC(const Gen::OpArg & arg, bool sign_extend) +void Jit64::ComputeRC(const Gen::OpArg & arg) { if (arg.IsImm()) { MOV(64, PPCSTATE(cr_val[0]), Imm32((s32)arg.offset)); } - else if (sign_extend) + else { MOVSX(64, 32, RSCRATCH, arg); MOV(64, PPCSTATE(cr_val[0]), R(RSCRATCH)); } - else - { - MOV(64, PPCSTATE(cr_val[0]), arg); - } } OpArg Jit64::ExtractFromReg(int reg, int offset) @@ -210,7 +206,7 @@ void Jit64::regimmop(int d, int a, bool binary, u32 value, Operation doop, void if (carry) FinalizeCarry(CC_C); if (Rc) - ComputeRC(gpr.R(d), doop != And || (value & 0x80000000)); + ComputeRC(gpr.R(d)); } else if (doop == Add) { diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp index c5b2a6e8f9..5f87d22ecb 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp @@ -95,8 +95,10 @@ void Jit64::psq_l(UGeckoInstruction inst) MOV(32, R(RSCRATCH2), Imm32(0x3F07)); AND(32, R(RSCRATCH2), M(((char *)&GQR(inst.I)) + 2)); MOVZX(32, 8, RSCRATCH, R(RSCRATCH2)); + if (inst.W) + OR(32, R(RSCRATCH), Imm8(8)); - CALLptr(MScaled(RSCRATCH, SCALE_8, (u32)(u64)(asm_routines.pairedLoadQuantized + inst.W * 8))); + CALLptr(MScaled(RSCRATCH, SCALE_8, (u32)(u64)asm_routines.pairedLoadQuantized)); MEMCHECK_START(false) CVTPS2PD(fpr.RX(s), R(XMM0));