jit: correct cycle counting for thumb shift by reg

This commit is contained in:
RSDuck 2019-06-25 18:28:01 +02:00
parent 2f6b46fd4f
commit ea98a44e1e
2 changed files with 5 additions and 2 deletions

View File

@ -456,6 +456,9 @@ void Compiler::T_Comp_ALU()
u32 op = (CurrentInstr.Instr >> 6) & 0xF; u32 op = (CurrentInstr.Instr >> 6) & 0xF;
if ((op >= 0x2 && op < 0x4) || op == 0x7)
Comp_AddCycles_CI(1);
else
Comp_AddCycles_C(); Comp_AddCycles_C();
switch (op) switch (op)
@ -471,7 +474,7 @@ void Compiler::T_Comp_ALU()
case 0x4: case 0x4:
case 0x7: case 0x7:
{ {
int shiftOp = op == 7 ? 3 : op - 0x2; int shiftOp = op == 0x7 ? 3 : op - 0x2;
bool carryUsed; bool carryUsed;
OpArg shifted = Comp_RegShiftReg(shiftOp, rs, rd, true, carryUsed); OpArg shifted = Comp_RegShiftReg(shiftOp, rs, rd, true, carryUsed);
TEST(32, shifted, shifted); TEST(32, shifted, shifted);

View File