From e699b6b2832096cc2fff85c6c62f28e103ea86ad Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 15 Oct 2018 21:02:16 +0100 Subject: [PATCH] Jit: Remove OpArg variant of ComputeRC --- Source/Core/Core/PowerPC/Jit64/Jit.h | 1 - .../Core/Core/PowerPC/Jit64/Jit_Integer.cpp | 42 ------------------- 2 files changed, 43 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.h b/Source/Core/Core/PowerPC/Jit64/Jit.h index a53d615587..35b356f32d 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.h +++ b/Source/Core/Core/PowerPC/Jit64/Jit.h @@ -89,7 +89,6 @@ public: void FinalizeCarry(Gen::CCFlags cond); void FinalizeCarry(bool ca); void ComputeRC(preg_t preg, bool needs_test = true, bool needs_sext = true); - void ComputeRC(const Gen::OpArg& arg, bool needs_test = true, bool needs_sext = true); void AndWithMask(Gen::X64Reg reg, u32 mask); bool CheckMergedBranch(u32 crf) const; diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index 717646e9e5..cdf9dc4218 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -190,48 +190,6 @@ void Jit64::ComputeRC(preg_t preg, bool needs_test, bool needs_sext) } } -void Jit64::ComputeRC(const OpArg& arg, bool needs_test, bool needs_sext) -{ - ASSERT_MSG(DYNA_REC, arg.IsSimpleReg() || arg.IsImm(), "Invalid ComputeRC operand"); - if (arg.IsImm()) - { - MOV(64, PPCSTATE(cr_val[0]), Imm32(arg.SImm32())); - } - else if (needs_sext) - { - MOVSX(64, 32, RSCRATCH, arg); - MOV(64, PPCSTATE(cr_val[0]), R(RSCRATCH)); - } - else - { - MOV(64, PPCSTATE(cr_val[0]), arg); - } - if (CheckMergedBranch(0)) - { - if (arg.IsImm()) - { - DoMergedBranchImmediate(arg.SImm32()); - } - else - { - if (needs_test) - { - TEST(32, arg, arg); - } - else - { - // If an operand to the cmp/rc op we're merging with the branch isn't used anymore, it'd be - // better to flush it here so that we don't have to flush it on both sides of the branch. - // We don't want to do this if a test is needed though, because it would interrupt macro-op - // fusion. - for (int j : ~js.op->gprInUse) - gpr.StoreFromRegister(j); - } - DoMergedBranchCondition(); - } - } -} - // we can't do this optimization in the emitter because MOVZX and AND have different effects on // flags. void Jit64::AndWithMask(X64Reg reg, u32 mask)