summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2020-12-03 15:32:45 -0800
committerGravatar GitHub2020-12-03 15:32:45 -0800
commit69aaad9b9684570284efcdb5921e54d0f5983838 (patch)
tree364256228dfcdfc989a597aca2a6c753b173f93a /src/core/core.cpp
parentMerge pull request #5059 from lioncash/mouse (diff)
parentkernel: scheduler: Minor cleanup to remove duplicated code. (diff)
downloadyuzu-69aaad9b9684570284efcdb5921e54d0f5983838.tar.gz
yuzu-69aaad9b9684570284efcdb5921e54d0f5983838.tar.xz
yuzu-69aaad9b9684570284efcdb5921e54d0f5983838.zip
Merge pull request #4996 from bunnei/use-4jits
Kernel: Refactor to use 4-instances of Dynarmic & various cleanups and improvements
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 76a38ea2a..01e4faac8 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -245,6 +245,7 @@ struct System::Impl {
245 } 245 }
246 AddGlueRegistrationForProcess(*app_loader, *main_process); 246 AddGlueRegistrationForProcess(*app_loader, *main_process);
247 kernel.MakeCurrentProcess(main_process.get()); 247 kernel.MakeCurrentProcess(main_process.get());
248 kernel.InitializeCores();
248 249
249 // Initialize cheat engine 250 // Initialize cheat engine
250 if (cheat_engine) { 251 if (cheat_engine) {
@@ -456,6 +457,10 @@ void System::InvalidateCpuInstructionCaches() {
456 impl->kernel.InvalidateAllInstructionCaches(); 457 impl->kernel.InvalidateAllInstructionCaches();
457} 458}
458 459
460void System::InvalidateCpuInstructionCacheRange(VAddr addr, std::size_t size) {
461 impl->kernel.InvalidateCpuInstructionCacheRange(addr, size);
462}
463
459void System::Shutdown() { 464void System::Shutdown() {
460 impl->Shutdown(); 465 impl->Shutdown();
461} 466}
@@ -490,11 +495,11 @@ const TelemetrySession& System::TelemetrySession() const {
490} 495}
491 496
492ARM_Interface& System::CurrentArmInterface() { 497ARM_Interface& System::CurrentArmInterface() {
493 return impl->kernel.CurrentScheduler().GetCurrentThread()->ArmInterface(); 498 return impl->kernel.CurrentPhysicalCore().ArmInterface();
494} 499}
495 500
496const ARM_Interface& System::CurrentArmInterface() const { 501const ARM_Interface& System::CurrentArmInterface() const {
497 return impl->kernel.CurrentScheduler().GetCurrentThread()->ArmInterface(); 502 return impl->kernel.CurrentPhysicalCore().ArmInterface();
498} 503}
499 504
500std::size_t System::CurrentCoreIndex() const { 505std::size_t System::CurrentCoreIndex() const {
@@ -554,15 +559,11 @@ const Kernel::Process* System::CurrentProcess() const {
554} 559}
555 560
556ARM_Interface& System::ArmInterface(std::size_t core_index) { 561ARM_Interface& System::ArmInterface(std::size_t core_index) {
557 auto* thread = impl->kernel.Scheduler(core_index).GetCurrentThread(); 562 return impl->kernel.PhysicalCore(core_index).ArmInterface();
558 ASSERT(thread && !thread->IsHLEThread());
559 return thread->ArmInterface();
560} 563}
561 564
562const ARM_Interface& System::ArmInterface(std::size_t core_index) const { 565const ARM_Interface& System::ArmInterface(std::size_t core_index) const {
563 auto* thread = impl->kernel.Scheduler(core_index).GetCurrentThread(); 566 return impl->kernel.PhysicalCore(core_index).ArmInterface();
564 ASSERT(thread && !thread->IsHLEThread());
565 return thread->ArmInterface();
566} 567}
567 568
568ExclusiveMonitor& System::Monitor() { 569ExclusiveMonitor& System::Monitor() {