diff options
author | bunnei <bunneidev@gmail.com> | 2020-11-13 20:11:12 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-11-29 10:31:51 +0100 |
commit | 7b642c77811dc3887756f5abac5a9710564b098e (patch) | |
tree | 09c9d764734db56896f77d986afa6ccd5d2c745d /src/core/cpu_manager.cpp | |
parent | Merge pull request #4998 from Morph1984/bioshock-patch (diff) | |
download | yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar.gz yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar.bz2 yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar.lz yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar.xz yuzu-7b642c77811dc3887756f5abac5a9710564b098e.tar.zst yuzu-7b642c77811dc3887756f5abac5a9710564b098e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/cpu_manager.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index eeeb6e8df..0cff985e9 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp @@ -113,22 +113,23 @@ void CpuManager::MultiCoreRunGuestThread() { auto& sched = kernel.CurrentScheduler(); sched.OnThreadStart(); } + auto* thread = kernel.CurrentScheduler().GetCurrentThread(); + auto& host_context = thread->GetHostContext(); + host_context->SetRewindPoint(GuestRewindFunction, this); MultiCoreRunGuestLoop(); } void CpuManager::MultiCoreRunGuestLoop() { auto& kernel = system.Kernel(); - auto* thread = kernel.CurrentScheduler().GetCurrentThread(); + while (true) { auto* physical_core = &kernel.CurrentPhysicalCore(); - auto& arm_interface = thread->ArmInterface(); system.EnterDynarmicProfile(); while (!physical_core->IsInterrupted()) { - arm_interface.Run(); + physical_core->Run(); physical_core = &kernel.CurrentPhysicalCore(); } system.ExitDynarmicProfile(); - arm_interface.ClearExclusiveState(); auto& scheduler = kernel.CurrentScheduler(); scheduler.TryDoContextSwitch(); } @@ -209,6 +210,9 @@ void CpuManager::SingleCoreRunGuestThread() { auto& sched = kernel.CurrentScheduler(); sched.OnThreadStart(); } + auto* thread = kernel.CurrentScheduler().GetCurrentThread(); + auto& host_context = thread->GetHostContext(); + host_context->SetRewindPoint(GuestRewindFunction, this); SingleCoreRunGuestLoop(); } @@ -217,17 +221,15 @@ void CpuManager::SingleCoreRunGuestLoop() { auto* thread = kernel.CurrentScheduler().GetCurrentThread(); while (true) { auto* physical_core = &kernel.CurrentPhysicalCore(); - auto& arm_interface = thread->ArmInterface(); system.EnterDynarmicProfile(); if (!physical_core->IsInterrupted()) { - arm_interface.Run(); + physical_core->Run(); physical_core = &kernel.CurrentPhysicalCore(); } system.ExitDynarmicProfile(); thread->SetPhantomMode(true); system.CoreTiming().Advance(); thread->SetPhantomMode(false); - arm_interface.ClearExclusiveState(); PreemptSingleCore(); auto& scheduler = kernel.Scheduler(current_core); scheduler.TryDoContextSwitch(); |