diff options
| author | bunnei <bunneidev@gmail.com> | 2020-03-04 20:37:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-04 20:37:51 -0500 |
| commit | a157ecf76c8aa0add62ca8273aad5d0d4eb7ebee (patch) | |
| tree | ee9cd2105f8802f81744f17154e767aa518ce867 /src/core/hle/kernel/physical_core.cpp | |
| parent | 6c42a3b9de41a8104df1e24d984739b43bded670 (diff) | |
| parent | 36c4c33bb8de79c079b881d34a25fa34ab3ca848 (diff) | |
Merge pull request #3478 from bunnei/a32
Refactoring to boot A32 games
Diffstat (limited to 'src/core/hle/kernel/physical_core.cpp')
| -rw-r--r-- | src/core/hle/kernel/physical_core.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/core/hle/kernel/physical_core.cpp b/src/core/hle/kernel/physical_core.cpp index 9303dd273c..aa2787467e 100644 --- a/src/core/hle/kernel/physical_core.cpp +++ b/src/core/hle/kernel/physical_core.cpp @@ -5,7 +5,8 @@ #include "common/logging/log.h" #include "core/arm/arm_interface.h" #ifdef ARCHITECTURE_x86_64 -#include "core/arm/dynarmic/arm_dynarmic.h" +#include "core/arm/dynarmic/arm_dynarmic_32.h" +#include "core/arm/dynarmic/arm_dynarmic_64.h" #endif #include "core/arm/exclusive_monitor.h" #include "core/arm/unicorn/arm_unicorn.h" @@ -20,13 +21,17 @@ PhysicalCore::PhysicalCore(Core::System& system, std::size_t id, Core::ExclusiveMonitor& exclusive_monitor) : core_index{id} { #ifdef ARCHITECTURE_x86_64 - arm_interface = std::make_unique<Core::ARM_Dynarmic>(system, exclusive_monitor, core_index); + arm_interface_32 = + std::make_unique<Core::ARM_Dynarmic_32>(system, exclusive_monitor, core_index); + arm_interface_64 = + std::make_unique<Core::ARM_Dynarmic_64>(system, exclusive_monitor, core_index); + #else arm_interface = std::make_shared<Core::ARM_Unicorn>(system); LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available"); #endif - scheduler = std::make_unique<Kernel::Scheduler>(system, *arm_interface, core_index); + scheduler = std::make_unique<Kernel::Scheduler>(system, core_index); } PhysicalCore::~PhysicalCore() = default; @@ -48,4 +53,12 @@ void PhysicalCore::Shutdown() { scheduler->Shutdown(); } +void PhysicalCore::SetIs64Bit(bool is_64_bit) { + if (is_64_bit) { + arm_interface = arm_interface_64.get(); + } else { + arm_interface = arm_interface_32.get(); + } +} + } // namespace Kernel |
