mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Optimized addx()
Removed some code duplication Fixed whitespace Moved else condition
This commit is contained in:
parent
558abae760
commit
7e8cfff3c0
@ -282,6 +282,25 @@ void JitArm64::addx(UGeckoInstruction inst)
|
||||
if (inst.Rc)
|
||||
ComputeRC(gpr.GetImm(d), 0);
|
||||
}
|
||||
else if (gpr.IsImm(a) || gpr.IsImm(b))
|
||||
{
|
||||
int imm_reg = gpr.IsImm(a) ? a : b;
|
||||
int in_reg = gpr.IsImm(a) ? b : a;
|
||||
gpr.BindToRegister(d, d == in_reg);
|
||||
if (gpr.GetImm(imm_reg) < 4096)
|
||||
{
|
||||
ADD(gpr.R(d), gpr.R(in_reg), gpr.GetImm(imm_reg));
|
||||
}
|
||||
else
|
||||
{
|
||||
ARM64Reg WA = gpr.GetReg();
|
||||
MOVI2R(WA, gpr.GetImm(imm_reg));
|
||||
ADD(gpr.R(d), gpr.R(in_reg), WA);
|
||||
gpr.Unlock(WA);
|
||||
}
|
||||
if (inst.Rc)
|
||||
ComputeRC(gpr.R(d), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
gpr.BindToRegister(d, d == a || d == b);
|
||||
|
Loading…
Reference in New Issue
Block a user