mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
[ARM] Fix and optimize mtcrf.
This commit is contained in:
parent
1b1b5d2100
commit
930f997f04
@ -110,6 +110,7 @@ void JitArm::mtcrf(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITSystemRegistersOff)
|
||||
|
||||
ARMReg rA = gpr.GetReg();
|
||||
|
||||
// USES_CR
|
||||
@ -130,16 +131,17 @@ void JitArm::mtcrf(UGeckoInstruction inst)
|
||||
}
|
||||
else
|
||||
{
|
||||
ARMReg rB = gpr.GetReg();
|
||||
MOV(rA, gpr.R(inst.RS));
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if ((crm & (0x80 >> i)) != 0)
|
||||
{
|
||||
MOV(rA, gpr.R(inst.RS));
|
||||
LSR(rA, rA, 28 - (i * 4));
|
||||
AND(rA, rA, 0xF);
|
||||
STRB(rA, R9, PPCSTATE_OFF(cr_fast[i]));
|
||||
UBFX(rB, rA, 28 - (i * 4), 4);
|
||||
STRB(rB, R9, PPCSTATE_OFF(cr_fast[i]));
|
||||
}
|
||||
}
|
||||
gpr.Unlock(rB);
|
||||
}
|
||||
}
|
||||
gpr.Unlock(rA);
|
||||
|
Loading…
Reference in New Issue
Block a user