diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-29 02:45:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-29 02:45:05 +0200 |
commit | 420b1f89d319308ba43d1f92976aec39a5c2e3fd (patch) | |
tree | 91dc40b7158f4e1fcc16bf1d46f7121d03cacdc8 /src/core/arm/dynarmic/arm_dynarmic_32.cpp | |
parent | Merge pull request #6356 from ogniK5377/ApplyNpadSystemCommonPolicy (diff) | |
parent | core/arm_interface: Call SVC after end of dynarmic block. (diff) | |
download | yuzu-420b1f89d319308ba43d1f92976aec39a5c2e3fd.tar yuzu-420b1f89d319308ba43d1f92976aec39a5c2e3fd.tar.gz yuzu-420b1f89d319308ba43d1f92976aec39a5c2e3fd.tar.bz2 yuzu-420b1f89d319308ba43d1f92976aec39a5c2e3fd.tar.lz yuzu-420b1f89d319308ba43d1f92976aec39a5c2e3fd.tar.xz yuzu-420b1f89d319308ba43d1f92976aec39a5c2e3fd.tar.zst yuzu-420b1f89d319308ba43d1f92976aec39a5c2e3fd.zip |
Diffstat (limited to 'src/core/arm/dynarmic/arm_dynarmic_32.cpp')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_32.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index e401fa825..50dc82382 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp @@ -78,7 +78,9 @@ public: } void CallSVC(u32 swi) override { - Kernel::Svc::Call(parent.system, swi); + parent.svc_called = true; + parent.svc_swi = swi; + parent.jit->HaltExecution(); } void AddTicks(u64 ticks) override { @@ -187,11 +189,17 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable* } void ARM_Dynarmic_32::Run() { - jit->Run(); -} - -void ARM_Dynarmic_32::ExceptionalExit() { - jit->ExceptionalExit(); + while (true) { + jit->Run(); + if (!svc_called) { + break; + } + svc_called = false; + Kernel::Svc::Call(system, svc_swi); + if (shutdown) { + break; + } + } } void ARM_Dynarmic_32::Step() { @@ -275,6 +283,7 @@ void ARM_Dynarmic_32::LoadContext(const ThreadContext32& ctx) { void ARM_Dynarmic_32::PrepareReschedule() { jit->HaltExecution(); + shutdown = true; } void ARM_Dynarmic_32::ClearInstructionCache() { |