JitArm64: Implement subfcx
This commit is contained in:
parent
550a90e691
commit
025e7c835a
|
@ -100,6 +100,7 @@ public:
|
|||
void slwx(UGeckoInstruction inst);
|
||||
void rlwimix(UGeckoInstruction inst);
|
||||
void subfex(UGeckoInstruction inst);
|
||||
void subfcx(UGeckoInstruction inst);
|
||||
|
||||
// System Registers
|
||||
void mtmsr(UGeckoInstruction inst);
|
||||
|
|
|
@ -784,6 +784,38 @@ void JitArm64::subfex(UGeckoInstruction inst)
|
|||
ComputeRC(gpr.R(d), 0);
|
||||
}
|
||||
|
||||
void JitArm64::subfcx(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITIntegerOff);
|
||||
FALLBACK_IF(inst.OE);
|
||||
|
||||
int a = inst.RA, b = inst.RB, d = inst.RD;
|
||||
|
||||
if (gpr.IsImm(a) && gpr.IsImm(b))
|
||||
{
|
||||
u32 a_imm = gpr.GetImm(a), b_imm = gpr.GetImm(b);
|
||||
|
||||
gpr.SetImmediate(d, b_imm - a_imm);
|
||||
ComputeCarry(a_imm == 0 || Interpreter::Helper_Carry(b_imm, 0u - a_imm));
|
||||
|
||||
if (inst.Rc)
|
||||
ComputeRC(gpr.GetImm(d), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
gpr.BindToRegister(d, d == a || d == b);
|
||||
|
||||
// d = b - a
|
||||
SUBS(gpr.R(d), gpr.R(b), gpr.R(a));
|
||||
|
||||
ComputeCarry();
|
||||
|
||||
if (inst.Rc)
|
||||
ComputeRC(gpr.R(d), 0);
|
||||
}
|
||||
}
|
||||
|
||||
void JitArm64::addcx(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
|
|
|
@ -192,8 +192,8 @@ static GekkoOPTemplate table31[] =
|
|||
{616, &JitArm64::negx}, // negox
|
||||
{40, &JitArm64::subfx}, // subfx
|
||||
{552, &JitArm64::subfx}, // subfox
|
||||
{8, &JitArm64::FallBackToInterpreter}, // subfcx
|
||||
{520, &JitArm64::FallBackToInterpreter}, // subfcox
|
||||
{8, &JitArm64::subfcx}, // subfcx
|
||||
{520, &JitArm64::subfcx}, // subfcox
|
||||
{136, &JitArm64::subfex}, // subfex
|
||||
{648, &JitArm64::subfex}, // subfeox
|
||||
{232, &JitArm64::FallBackToInterpreter}, // subfmex
|
||||
|
|
Loading…
Reference in New Issue