Jit64: addx - Deduplicate branches part 1

No functional change, just simplify some repeated logic for the cases
where the destination register matches one of the sources.
This commit is contained in:
Sintendo 2020-04-19 22:38:58 +02:00
parent c33565295d
commit 72fbdf1a6b
1 changed files with 3 additions and 6 deletions

View File

@ -1330,13 +1330,10 @@ void Jit64::addx(UGeckoInstruction inst)
RCX64Reg Rd = gpr.Bind(d, RCMode::Write); RCX64Reg Rd = gpr.Bind(d, RCMode::Write);
RegCache::Realize(Ra, Rb, Rd); RegCache::Realize(Ra, Rb, Rd);
if (d == a) if ((d == a) || (d == b))
{ {
ADD(32, Rd, Rb); RCOpArg& Rnotd = (d == a) ? Rb : Ra;
} ADD(32, Rd, Rnotd);
else if (d == b)
{
ADD(32, Rd, Ra);
} }
else if (Ra.IsSimpleReg() && Rb.IsSimpleReg() && !inst.OE) else if (Ra.IsSimpleReg() && Rb.IsSimpleReg() && !inst.OE)
{ {