summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-12-03 15:32:45 -0800
committerGitHub <noreply@github.com>2020-12-03 15:32:45 -0800
commit69aaad9b9684570284efcdb5921e54d0f5983838 (patch)
tree364256228dfcdfc989a597aca2a6c753b173f93a /src/core/core.cpp
parent843ef8f2ec8b1645e7aa5eec7fcc8a76f0d3b666 (diff)
parent4b9e1b6586a8a4017b8e3e0fb52457d1e2568066 (diff)
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 {
}
AddGlueRegistrationForProcess(*app_loader, *main_process);
kernel.MakeCurrentProcess(main_process.get());
+ kernel.InitializeCores();
// Initialize cheat engine
if (cheat_engine) {
@@ -456,6 +457,10 @@ void System::InvalidateCpuInstructionCaches() {
impl->kernel.InvalidateAllInstructionCaches();
}
+void System::InvalidateCpuInstructionCacheRange(VAddr addr, std::size_t size) {
+ impl->kernel.InvalidateCpuInstructionCacheRange(addr, size);
+}
+
void System::Shutdown() {
impl->Shutdown();
}
@@ -490,11 +495,11 @@ const TelemetrySession& System::TelemetrySession() const {
}
ARM_Interface& System::CurrentArmInterface() {
- return impl->kernel.CurrentScheduler().GetCurrentThread()->ArmInterface();
+ return impl->kernel.CurrentPhysicalCore().ArmInterface();
}
const ARM_Interface& System::CurrentArmInterface() const {
- return impl->kernel.CurrentScheduler().GetCurrentThread()->ArmInterface();
+ return impl->kernel.CurrentPhysicalCore().ArmInterface();
}
std::size_t System::CurrentCoreIndex() const {
@@ -554,15 +559,11 @@ const Kernel::Process* System::CurrentProcess() const {
}
ARM_Interface& System::ArmInterface(std::size_t core_index) {
- auto* thread = impl->kernel.Scheduler(core_index).GetCurrentThread();
- ASSERT(thread && !thread->IsHLEThread());
- return thread->ArmInterface();
+ return impl->kernel.PhysicalCore(core_index).ArmInterface();
}
const ARM_Interface& System::ArmInterface(std::size_t core_index) const {
- auto* thread = impl->kernel.Scheduler(core_index).GetCurrentThread();
- ASSERT(thread && !thread->IsHLEThread());
- return thread->ArmInterface();
+ return impl->kernel.PhysicalCore(core_index).ArmInterface();
}
ExclusiveMonitor& System::Monitor() {