dynarmic_tests: Resolve CPSR discrepancies in tests
Unicorn internally checks if the LSB is set in order to determine whether or not it should assume thumb mode internally. Clearing this ourselves will always result in the incorrect PSR between runs.
This commit is contained in:
parent
134b586c5c
commit
c098ade2e7
1 changed files with 1 additions and 2 deletions
|
@ -52,8 +52,7 @@ void A32Unicorn<TestEnvironment>::Run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool T = Dynarmic::Common::Bit<5>(GetCpsr());
|
const bool T = Dynarmic::Common::Bit<5>(GetCpsr());
|
||||||
const u32 mask = T ? 0xFFFFFFFE : 0xFFFFFFFC;
|
const u32 new_pc = GetPC() | (T ? 1 : 0);
|
||||||
const u32 new_pc = GetPC() & mask;
|
|
||||||
SetPC(new_pc);
|
SetPC(new_pc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue