diff options
| author | 2018-02-14 18:47:48 +0100 | |
|---|---|---|
| committer | 2018-02-25 11:44:21 +0100 | |
| commit | bc88cae0c730ece6d027778267eb0fa256479bda (patch) | |
| tree | eaf8581141f7240b6cf23eda17834558b6fe1c40 /src/core/arm/unicorn | |
| parent | Merge pull request #190 from bunnei/fix-qt-waittree (diff) | |
| download | yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.tar.gz yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.tar.xz yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.zip | |
Implements citra-emu/citra#3184
Diffstat (limited to 'src/core/arm/unicorn')
| -rw-r--r-- | src/core/arm/unicorn/arm_unicorn.cpp | 9 | ||||
| -rw-r--r-- | src/core/arm/unicorn/arm_unicorn.h | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/core/arm/unicorn/arm_unicorn.cpp b/src/core/arm/unicorn/arm_unicorn.cpp index fd64eab39..7542ed46a 100644 --- a/src/core/arm/unicorn/arm_unicorn.cpp +++ b/src/core/arm/unicorn/arm_unicorn.cpp | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | ||
| 5 | #include <unicorn/arm64.h> | 6 | #include <unicorn/arm64.h> |
| 6 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 7 | #include "common/microprofile.h" | 8 | #include "common/microprofile.h" |
| @@ -148,6 +149,14 @@ void ARM_Unicorn::SetTlsAddress(VAddr base) { | |||
| 148 | CHECKED(uc_reg_write(uc, UC_ARM64_REG_TPIDRRO_EL0, &base)); | 149 | CHECKED(uc_reg_write(uc, UC_ARM64_REG_TPIDRRO_EL0, &base)); |
| 149 | } | 150 | } |
| 150 | 151 | ||
| 152 | void ARM_Unicorn::Run() { | ||
| 153 | ExecuteInstructions(std::max(CoreTiming::GetDowncount(), 0)); | ||
| 154 | } | ||
| 155 | |||
| 156 | void ARM_Unicorn::Step() { | ||
| 157 | ExecuteInstructions(1); | ||
| 158 | } | ||
| 159 | |||
| 151 | MICROPROFILE_DEFINE(ARM_Jit, "ARM JIT", "ARM JIT", MP_RGB(255, 64, 64)); | 160 | MICROPROFILE_DEFINE(ARM_Jit, "ARM JIT", "ARM JIT", MP_RGB(255, 64, 64)); |
| 152 | 161 | ||
| 153 | void ARM_Unicorn::ExecuteInstructions(int num_instructions) { | 162 | void ARM_Unicorn::ExecuteInstructions(int num_instructions) { |
diff --git a/src/core/arm/unicorn/arm_unicorn.h b/src/core/arm/unicorn/arm_unicorn.h index c9a561dec..a2841c564 100644 --- a/src/core/arm/unicorn/arm_unicorn.h +++ b/src/core/arm/unicorn/arm_unicorn.h | |||
| @@ -29,7 +29,9 @@ public: | |||
| 29 | void SaveContext(ThreadContext& ctx) override; | 29 | void SaveContext(ThreadContext& ctx) override; |
| 30 | void LoadContext(const ThreadContext& ctx) override; | 30 | void LoadContext(const ThreadContext& ctx) override; |
| 31 | void PrepareReschedule() override; | 31 | void PrepareReschedule() override; |
| 32 | void ExecuteInstructions(int num_instructions) override; | 32 | void ExecuteInstructions(int num_instructions); |
| 33 | void Run() override; | ||
| 34 | void Step() override; | ||
| 33 | void ClearInstructionCache() override; | 35 | void ClearInstructionCache() override; |
| 34 | void PageTableChanged() override{}; | 36 | void PageTableChanged() override{}; |
| 35 | 37 | ||