jit: fix BLX_reg with rn=lr

This commit is contained in:
RSDuck 2019-07-15 19:17:10 +02:00 committed by RSDuck
parent 86f2be7260
commit dd04cef47e
2 changed files with 2 additions and 4 deletions

View File

@ -187,9 +187,10 @@ void Compiler::A_Comp_BranchImm()
void Compiler::A_Comp_BranchXchangeReg()
{
OpArg rn = MapReg(CurInstr.A_Reg(0));
MOV(32, R(RSCRATCH), rn);
if ((CurInstr.Instr & 0xF0) == 0x30) // BLX_reg
MOV(32, MapReg(14), Imm32(R15 - 4));
Comp_JumpTo(rn.GetSimpleReg());
Comp_JumpTo(RSCRATCH);
}
void Compiler::T_Comp_BCOND()

View File

@ -359,10 +359,7 @@ Info Decode(bool thumb, u32 num, u32 instr)
}
if (data & A_Link)
{
res.DstRegs |= 1 << 14;
res.SrcRegs |= 1 << 15;
}
if (res.Kind == ak_LDM)
res.DstRegs |= instr & (1 << 15); // this is right