diff options
author | bunnei <bunneidev@gmail.com> | 2020-01-31 00:13:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 00:13:59 +0100 |
commit | 985d0f35e55f0752c6e147d0140b367708499cb4 (patch) | |
tree | 119249aee3acc2cc2ee6a5d391288b52c126765b /src/core/arm | |
parent | Merge pull request #3151 from FearlessTobi/fix-korean (diff) | |
parent | System: Address Feedback (diff) | |
download | yuzu-985d0f35e55f0752c6e147d0140b367708499cb4.tar yuzu-985d0f35e55f0752c6e147d0140b367708499cb4.tar.gz yuzu-985d0f35e55f0752c6e147d0140b367708499cb4.tar.bz2 yuzu-985d0f35e55f0752c6e147d0140b367708499cb4.tar.lz yuzu-985d0f35e55f0752c6e147d0140b367708499cb4.tar.xz yuzu-985d0f35e55f0752c6e147d0140b367708499cb4.tar.zst yuzu-985d0f35e55f0752c6e147d0140b367708499cb4.zip |
Diffstat (limited to 'src/core/arm')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 2 | ||||
-rw-r--r-- | src/core/arm/exclusive_monitor.cpp | 14 | ||||
-rw-r--r-- | src/core/arm/exclusive_monitor.h | 9 |
3 files changed, 24 insertions, 1 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index e825c0526..f468e57e4 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -10,7 +10,7 @@ #include "common/microprofile.h" #include "core/arm/dynarmic/arm_dynarmic.h" #include "core/core.h" -#include "core/core_cpu.h" +#include "core/core_manager.h" #include "core/core_timing.h" #include "core/core_timing_util.h" #include "core/gdbstub/gdbstub.h" diff --git a/src/core/arm/exclusive_monitor.cpp b/src/core/arm/exclusive_monitor.cpp index abd59ff4b..94570e520 100644 --- a/src/core/arm/exclusive_monitor.cpp +++ b/src/core/arm/exclusive_monitor.cpp @@ -2,10 +2,24 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#ifdef ARCHITECTURE_x86_64 +#include "core/arm/dynarmic/arm_dynarmic.h" +#endif #include "core/arm/exclusive_monitor.h" +#include "core/memory.h" namespace Core { ExclusiveMonitor::~ExclusiveMonitor() = default; +std::unique_ptr<Core::ExclusiveMonitor> MakeExclusiveMonitor(Memory::Memory& memory, + std::size_t num_cores) { +#ifdef ARCHITECTURE_x86_64 + return std::make_unique<Core::DynarmicExclusiveMonitor>(memory, num_cores); +#else + // TODO(merry): Passthrough exclusive monitor + return nullptr; +#endif +} + } // namespace Core diff --git a/src/core/arm/exclusive_monitor.h b/src/core/arm/exclusive_monitor.h index f59aca667..4ef418b90 100644 --- a/src/core/arm/exclusive_monitor.h +++ b/src/core/arm/exclusive_monitor.h @@ -4,8 +4,14 @@ #pragma once +#include <memory> + #include "common/common_types.h" +namespace Memory { +class Memory; +} + namespace Core { class ExclusiveMonitor { @@ -22,4 +28,7 @@ public: virtual bool ExclusiveWrite128(std::size_t core_index, VAddr vaddr, u128 value) = 0; }; +std::unique_ptr<Core::ExclusiveMonitor> MakeExclusiveMonitor(Memory::Memory& memory, + std::size_t num_cores); + } // namespace Core |