tests/JitX64: Add tests for testing data processing instructions with Rd=R15

This commit is contained in:
MerryMage
2016-03-22 03:44:36 +00:00
parent be46235efe
commit 67ed95cb7d
4 changed files with 42 additions and 7 deletions

View File

@@ -3888,6 +3888,8 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
LOAD_NZCVT;
DISPATCH:
{
if (num_instrs >= cpu->NumInstrsToExecute) goto END;
if (!cpu->NirqSig) {
if (!(cpu->Cpsr & 0x80)) {
goto END;

View File

@@ -49,10 +49,14 @@ void JitX64::CompileDataProcessingHelper_Reverse(ArmReg Rn_index, ArmReg Rd_inde
body(tmp);
// TODO: Efficiency: Could implement this as a register rebind instead of needing to MOV.
reg_alloc.LockAndDirtyArm(Rd_index);
code->MOV(32, reg_alloc.ArmR(Rd_index), R(tmp));
reg_alloc.UnlockArm(Rd_index);
if (Rd_index != 15) {
// TODO: Efficiency: Could implement this as a register rebind instead of needing to MOV.
reg_alloc.LockAndDirtyArm(Rd_index);
code->MOV(32, reg_alloc.ArmR(Rd_index), R(tmp));
reg_alloc.UnlockArm(Rd_index);
} else {
code->MOV(32, MJitStateArmPC(), R(tmp));
}
reg_alloc.UnlockTemp(tmp);
}

View File

@@ -61,7 +61,7 @@ private:
ArmReg arm_reg = -1; ///< Only holds a valid value when state == DirtyArmReg / CleanArmReg
};
std::array<ArmState, 15> arm_gpr;
std::array<ArmState, 16> arm_gpr;
std::array<X64State, 16> x64_gpr;
Gen::XEmitter* code = nullptr;