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:
Lioncash 2019-05-02 11:04:11 -04:00 committed by MerryMage
parent 134b586c5c
commit c098ade2e7

View file

@ -52,8 +52,7 @@ void A32Unicorn<TestEnvironment>::Run() {
}
const bool T = Dynarmic::Common::Bit<5>(GetCpsr());
const u32 mask = T ? 0xFFFFFFFE : 0xFFFFFFFC;
const u32 new_pc = GetPC() & mask;
const u32 new_pc = GetPC() | (T ? 1 : 0);
SetPC(new_pc);
}