Skip to content

Commit

Permalink
JitArm64: rlwimix - Conditionally skip temp reg allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bram Speeckaert committed May 7, 2024
1 parent f7c97ae commit b63808a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2106,15 +2106,19 @@ void JitArm64::rlwimix(UGeckoInstruction inst)
else
{
gpr.BindToRegister(a, true);
const bool allocate_reg = a == s;
ARM64Reg RA = gpr.R(a);
ARM64Reg WA = gpr.GetReg();
ARM64Reg WB = gpr.GetReg();
ARM64Reg WB = allocate_reg ? gpr.GetReg() : RA;

MOVI2R(WA, mask);
BIC(WB, gpr.R(a), WA);
BIC(WB, RA, WA);
AND(WA, WA, gpr.R(s), ArithOption(gpr.R(s), ShiftType::ROR, rot_dist));
ORR(gpr.R(a), WB, WA);
ORR(RA, WB, WA);

gpr.Unlock(WA, WB);
gpr.Unlock(WA);
if (allocate_reg)
gpr.Unlock(WB);
}

if (inst.Rc)
Expand Down

0 comments on commit b63808a

Please sign in to comment.