mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-02 19:12:47 +02:00
JitArm64: Optimize carry behavior of srawix.
This commit is contained in:
parent
0d78f5926f
commit
3405f5ac1a
@ -595,25 +595,32 @@ void JitArm64::srawix(UGeckoInstruction inst)
|
|||||||
gpr.BindToRegister(a, a == s);
|
gpr.BindToRegister(a, a == s);
|
||||||
ARM64Reg RA = gpr.R(a);
|
ARM64Reg RA = gpr.R(a);
|
||||||
ARM64Reg RS = gpr.R(s);
|
ARM64Reg RS = gpr.R(s);
|
||||||
ARM64Reg WA = gpr.GetReg();
|
ARM64Reg WA;
|
||||||
|
|
||||||
|
if (js.op->wantsCA)
|
||||||
|
{
|
||||||
|
WA = gpr.GetReg();
|
||||||
ORR(WA, WSP, RS, ArithOption(RS, ST_LSL, 32 - amount));
|
ORR(WA, WSP, RS, ArithOption(RS, ST_LSL, 32 - amount));
|
||||||
|
}
|
||||||
ORR(RA, WSP, RS, ArithOption(RS, ST_ASR, amount));
|
ORR(RA, WSP, RS, ArithOption(RS, ST_ASR, amount));
|
||||||
if (inst.Rc)
|
if (inst.Rc)
|
||||||
ComputeRC(RA, 0);
|
ComputeRC(RA, 0);
|
||||||
|
|
||||||
|
if (js.op->wantsCA)
|
||||||
|
{
|
||||||
ANDS(WSP, WA, RA);
|
ANDS(WSP, WA, RA);
|
||||||
CSINC(WA, WSP, WSP, CC_EQ);
|
CSINC(WA, WSP, WSP, CC_EQ);
|
||||||
STRB(INDEX_UNSIGNED, WA, PPC_REG, PPCSTATE_OFF(xer_ca));
|
STRB(INDEX_UNSIGNED, WA, PPC_REG, PPCSTATE_OFF(xer_ca));
|
||||||
gpr.Unlock(WA);
|
gpr.Unlock(WA);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gpr.BindToRegister(a, a == s);
|
gpr.BindToRegister(a, a == s);
|
||||||
ARM64Reg RA = gpr.R(a);
|
ARM64Reg RA = gpr.R(a);
|
||||||
ARM64Reg RS = gpr.R(s);
|
ARM64Reg RS = gpr.R(s);
|
||||||
MOV(RA, RS);
|
MOV(RA, RS);
|
||||||
STRB(INDEX_UNSIGNED, WSP, PPC_REG, PPCSTATE_OFF(xer_ca));
|
ComputeCarry(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user