From 9ab83180db7fa74085c0c185661fa8f6d8fb7878 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Fri, 2 Apr 2021 19:33:28 +0100 Subject: [PATCH] {a32,a64}_interface: Clear exclusive state during an exceptional exit This is normally done by the ERET instruction during a service call. --- src/backend/x64/a32_interface.cpp | 1 + src/backend/x64/a64_interface.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/backend/x64/a32_interface.cpp b/src/backend/x64/a32_interface.cpp index 09d9d6c7..60abb147 100644 --- a/src/backend/x64/a32_interface.cpp +++ b/src/backend/x64/a32_interface.cpp @@ -90,6 +90,7 @@ struct Jit::Impl { } void ExceptionalExit() { + ClearExclusiveState(); if (!conf.wall_clock_cntpct) { const s64 ticks = jit_state.cycles_to_run - jit_state.cycles_remaining; conf.callbacks->AddTicks(ticks); diff --git a/src/backend/x64/a64_interface.cpp b/src/backend/x64/a64_interface.cpp index acde3f34..9bce1c7e 100644 --- a/src/backend/x64/a64_interface.cpp +++ b/src/backend/x64/a64_interface.cpp @@ -88,6 +88,7 @@ public: } void ExceptionalExit() { + ClearExclusiveState(); if (!conf.wall_clock_cntpct) { const s64 ticks = jit_state.cycles_to_run - jit_state.cycles_remaining; conf.callbacks->AddTicks(ticks);