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
parent 74cf752b2c
commit 16a9e3c4d3
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

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);
}