Permalink
Browse files

Jit: Remove OpArg variant of ComputeRC

  • Loading branch information...
MerryMage committed Oct 15, 2018
1 parent 7d7316c commit e699b6b2832096cc2fff85c6c62f28e103ea86ad
Showing with 0 additions and 43 deletions.
  1. +0 −1 Source/Core/Core/PowerPC/Jit64/Jit.h
  2. +0 −42 Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
@@ -89,7 +89,6 @@ class Jit64 : public Jitx86Base
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;
@@ -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)

0 comments on commit e699b6b

Please sign in to comment.