summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/physical_core.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-29 18:58:50 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:56 +0200
commit1b82ccec2220a69711ba75cf51ee98cbcfe6a510 (patch)
tree281ad19080ec4e6e14caa50b073acdfac005212b /src/core/hle/kernel/physical_core.cpp
parentX64 Clock: Reduce accuracy to be less or equal to guest accuracy. (diff)
downloadyuzu-1b82ccec2220a69711ba75cf51ee98cbcfe6a510.tar
yuzu-1b82ccec2220a69711ba75cf51ee98cbcfe6a510.tar.gz
yuzu-1b82ccec2220a69711ba75cf51ee98cbcfe6a510.tar.bz2
yuzu-1b82ccec2220a69711ba75cf51ee98cbcfe6a510.tar.lz
yuzu-1b82ccec2220a69711ba75cf51ee98cbcfe6a510.tar.xz
yuzu-1b82ccec2220a69711ba75cf51ee98cbcfe6a510.tar.zst
yuzu-1b82ccec2220a69711ba75cf51ee98cbcfe6a510.zip
Diffstat (limited to 'src/core/hle/kernel/physical_core.cpp')
-rw-r--r--src/core/hle/kernel/physical_core.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/core/hle/kernel/physical_core.cpp b/src/core/hle/kernel/physical_core.cpp
index ff14fcb42..9146b331d 100644
--- a/src/core/hle/kernel/physical_core.cpp
+++ b/src/core/hle/kernel/physical_core.cpp
@@ -21,21 +21,12 @@
namespace Kernel {
PhysicalCore::PhysicalCore(Core::System& system, std::size_t id,
- Core::ExclusiveMonitor& exclusive_monitor)
- : interrupt_handler{}, core_index{id} {
-#ifdef ARCHITECTURE_x86_64
- arm_interface_32 = std::make_unique<Core::ARM_Dynarmic_32>(system, interrupt_handler,
- exclusive_monitor, core_index);
- arm_interface_64 = std::make_unique<Core::ARM_Dynarmic_64>(system, interrupt_handler,
- exclusive_monitor, core_index);
-#else
- using Core::ARM_Unicorn;
- arm_interface_32 =
- std::make_unique<ARM_Unicorn>(system, interrupt_handler, ARM_Unicorn::Arch::AArch32);
- arm_interface_64 =
- std::make_unique<ARM_Unicorn>(system, interrupt_handler, ARM_Unicorn::Arch::AArch64);
- LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available");
-#endif
+ Core::ExclusiveMonitor& exclusive_monitor,
+ Core::CPUInterruptHandler& interrupt_handler,
+ Core::ARM_Interface& arm_interface32,
+ Core::ARM_Interface& arm_interface64)
+ : interrupt_handler{interrupt_handler}, core_index{id}, arm_interface_32{arm_interface32},
+ arm_interface_64{arm_interface64} {
scheduler = std::make_unique<Kernel::Scheduler>(system, core_index);
guard = std::make_unique<Common::SpinLock>();
@@ -69,9 +60,9 @@ void PhysicalCore::Shutdown() {
void PhysicalCore::SetIs64Bit(bool is_64_bit) {
if (is_64_bit) {
- arm_interface = arm_interface_64.get();
+ arm_interface = &arm_interface_64;
} else {
- arm_interface = arm_interface_32.get();
+ arm_interface = &arm_interface_32;
}
}