mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-19 02:36:27 +01:00
Jit: Remove OpArg variant of ComputeRC
This commit is contained in:
parent
7d7316c90f
commit
e699b6b283
@ -89,7 +89,6 @@ public:
|
|||||||
void FinalizeCarry(Gen::CCFlags cond);
|
void FinalizeCarry(Gen::CCFlags cond);
|
||||||
void FinalizeCarry(bool ca);
|
void FinalizeCarry(bool ca);
|
||||||
void ComputeRC(preg_t preg, bool needs_test = true, bool needs_sext = true);
|
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);
|
void AndWithMask(Gen::X64Reg reg, u32 mask);
|
||||||
bool CheckMergedBranch(u32 crf) const;
|
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
|
// we can't do this optimization in the emitter because MOVZX and AND have different effects on
|
||||||
// flags.
|
// flags.
|
||||||
void Jit64::AndWithMask(X64Reg reg, u32 mask)
|
void Jit64::AndWithMask(X64Reg reg, u32 mask)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user