From 16a9e3c4d3d598f2c3e58fadf2741ce568a36d6c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 2 May 2019 11:04:11 -0400 Subject: [PATCH] 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. --- tests/unicorn_emu/a32_unicorn.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/unicorn_emu/a32_unicorn.cpp b/tests/unicorn_emu/a32_unicorn.cpp index 21780ba5..29d0ecc6 100644 --- a/tests/unicorn_emu/a32_unicorn.cpp +++ b/tests/unicorn_emu/a32_unicorn.cpp @@ -52,8 +52,7 @@ void A32Unicorn::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); }