summaryrefslogtreecommitdiff
path: root/src/core/arm/unicorn
diff options
context:
space:
mode:
authorGravatar N00byKing2018-02-14 18:47:48 +0100
committerGravatar N00byKing2018-02-25 11:44:21 +0100
commitbc88cae0c730ece6d027778267eb0fa256479bda (patch)
treeeaf8581141f7240b6cf23eda17834558b6fe1c40 /src/core/arm/unicorn
parentMerge pull request #190 from bunnei/fix-qt-waittree (diff)
downloadyuzu-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.cpp9
-rw-r--r--src/core/arm/unicorn/arm_unicorn.h4
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
152void ARM_Unicorn::Run() {
153 ExecuteInstructions(std::max(CoreTiming::GetDowncount(), 0));
154}
155
156void ARM_Unicorn::Step() {
157 ExecuteInstructions(1);
158}
159
151MICROPROFILE_DEFINE(ARM_Jit, "ARM JIT", "ARM JIT", MP_RGB(255, 64, 64)); 160MICROPROFILE_DEFINE(ARM_Jit, "ARM JIT", "ARM JIT", MP_RGB(255, 64, 64));
152 161
153void ARM_Unicorn::ExecuteInstructions(int num_instructions) { 162void 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