mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
[ARM32] srawix optimization when source is an immediate.
This commit is contained in:
@ -1025,9 +1025,19 @@ void JitArm::srawix(UGeckoInstruction inst)
|
|||||||
int s = inst.RS;
|
int s = inst.RS;
|
||||||
int amount = inst.SH;
|
int amount = inst.SH;
|
||||||
|
|
||||||
gpr.BindToRegister(a, a == s);
|
if (gpr.IsImm(s))
|
||||||
if (amount != 0)
|
|
||||||
{
|
{
|
||||||
|
s32 imm = (s32)gpr.GetImm(s);
|
||||||
|
gpr.SetImmediate(a, imm >> amount);
|
||||||
|
|
||||||
|
if (amount != 0 && (imm < 0) && (imm << (32 - amount)))
|
||||||
|
ComputeCarry(true);
|
||||||
|
else
|
||||||
|
ComputeCarry(false);
|
||||||
|
}
|
||||||
|
else if (amount != 0)
|
||||||
|
{
|
||||||
|
gpr.BindToRegister(a, a == s);
|
||||||
ARMReg RA = gpr.R(a);
|
ARMReg RA = gpr.R(a);
|
||||||
ARMReg RS = gpr.R(s);
|
ARMReg RS = gpr.R(s);
|
||||||
ARMReg tmp = gpr.GetReg();
|
ARMReg tmp = gpr.GetReg();
|
||||||
@ -1049,6 +1059,7 @@ void JitArm::srawix(UGeckoInstruction inst)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
gpr.BindToRegister(a, a == s);
|
||||||
ARMReg RA = gpr.R(a);
|
ARMReg RA = gpr.R(a);
|
||||||
ARMReg RS = gpr.R(s);
|
ARMReg RS = gpr.R(s);
|
||||||
MOV(RA, RS);
|
MOV(RA, RS);
|
||||||
|
Reference in New Issue
Block a user