jit: fix thumb hi reg alu and mcr halt

+ mcr/mrc aren't always, msr_imm is never unk on ARM7
This commit is contained in:
RSDuck
2019-07-21 17:28:16 +02:00
parent 4deecc7d65
commit d74b15eecc
5 changed files with 45 additions and 16 deletions

View File

@ -663,7 +663,7 @@ void Compiler::T_Comp_ALU_HiReg()
switch (op)
{
case 0x0: // ADD
Comp_ArithTriOp(&Compiler::ADD, rdMapped, rdMapped, rs, false, opSymmetric|opRetriveCV);
Comp_ArithTriOp(&Compiler::ADD, rdMapped, rdMapped, rs, false, opSymmetric);
break;
case 0x1: // CMP
Comp_CmpOp(2, rdMapped, rs, false);
@ -671,8 +671,6 @@ void Compiler::T_Comp_ALU_HiReg()
case 0x2: // MOV
if (rdMapped != rs)
MOV(32, rdMapped, rs);
TEST(32, rdMapped, rdMapped);
Comp_RetriveFlags(false, false, false);
break;
}

View File

@ -235,16 +235,23 @@ void Compiler::T_Comp_B()
void Compiler::T_Comp_BranchXchangeReg()
{
bool link = CurInstr.Instr & (1 << 7);
if (link && Num == 1)
{
printf("BLX unsupported on ARM7!!!\n");
return;
}
OpArg rn = MapReg(CurInstr.A_Reg(3));
if (link)
{
if (Num == 1)
{
printf("BLX unsupported on ARM7!!!\n");
return;
}
MOV(32, R(RSCRATCH), MapReg(CurInstr.A_Reg(3)));
MOV(32, MapReg(14), Imm32(R15 - 1));
Comp_JumpTo(rn.GetSimpleReg());
Comp_JumpTo(RSCRATCH);
}
else
{
OpArg rn = MapReg(CurInstr.A_Reg(3));
Comp_JumpTo(rn.GetSimpleReg());
}
}
void Compiler::T_Comp_BL_LONG_1()