From b5ad066372f4904788f42fdff5b31c264567030f Mon Sep 17 00:00:00 2001 From: SachinVin <26602104+SachinVin@users.noreply.github.com> Date: Sun, 6 Nov 2022 01:02:48 +0530 Subject: [PATCH] backend/arm64: Properly return halt reason (#713) --- src/dynarmic/backend/arm64/a32_address_space.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dynarmic/backend/arm64/a32_address_space.cpp b/src/dynarmic/backend/arm64/a32_address_space.cpp index 25ac3c58..982789a6 100644 --- a/src/dynarmic/backend/arm64/a32_address_space.cpp +++ b/src/dynarmic/backend/arm64/a32_address_space.cpp @@ -192,6 +192,12 @@ void A32AddressSpace::EmitPrelude() { code.LDR(Wscratch0, SP, offsetof(StackLayout, save_host_fpcr)); code.MSR(oaknut::SystemReg::FPCR, Xscratch0); + oaknut::Label exit_hr_loop; + code.l(exit_hr_loop); + code.LDAXR(W0, Xhalt); + code.STLXR(Wscratch0, WZR, Xhalt); + code.CBNZ(Wscratch0, exit_hr_loop); + ABI_PopRegisters(code, ABI_CALLEE_SAVE | (1 << 30), sizeof(StackLayout)); code.RET();