diff --git a/include/dynarmic/A32/a32.h b/include/dynarmic/A32/a32.h index 046cd161..a898966f 100644 --- a/include/dynarmic/A32/a32.h +++ b/include/dynarmic/A32/a32.h @@ -87,6 +87,9 @@ public: void SaveContext(Context&) const; void LoadContext(const Context&); + /// Clears exclusive state for this core. + void ClearExclusiveState(); + /** * Returns true if Jit::Run was called but hasn't returned yet. * i.e.: We're in a callback. diff --git a/src/backend/x64/a32_interface.cpp b/src/backend/x64/a32_interface.cpp index 24eb3612..5548065f 100644 --- a/src/backend/x64/a32_interface.cpp +++ b/src/backend/x64/a32_interface.cpp @@ -102,6 +102,10 @@ struct Jit::Impl { emitter.ChangeProcessorID(value); } + void ClearExclusiveState() { + jit_state.exclusive_state = 0; + } + std::string Disassemble(const IR::LocationDescriptor& descriptor) { auto block = GetBasicBlock(descriptor); std::string result = fmt::format("address: {}\nsize: {} bytes\n", block.entrypoint, block.size); @@ -236,6 +240,10 @@ void Jit::ExceptionalExit() { is_executing = false; } +void Jit::ClearExclusiveState() { + impl->ClearExclusiveState(); +} + void Jit::ChangeProcessorID(size_t new_processor) { impl->ChangeProcessorID(new_processor); }