diff options
| author | 2018-03-18 22:35:47 -0400 | |
|---|---|---|
| committer | 2018-03-18 22:35:47 -0400 | |
| commit | 23a0d2d7b77fa619edc7d69d0162bd3071b67b4b (patch) | |
| tree | 85f20b5e8bbd0b1b2b6e28eac6224908a0f3b7fe /src/core/arm/unicorn | |
| parent | Merge pull request #250 from bunnei/buffer-dequeue-wait (diff) | |
| parent | Implements citra-emu/citra#3184 (diff) | |
| download | yuzu-23a0d2d7b77fa619edc7d69d0162bd3071b67b4b.tar.gz yuzu-23a0d2d7b77fa619edc7d69d0162bd3071b67b4b.tar.xz yuzu-23a0d2d7b77fa619edc7d69d0162bd3071b67b4b.zip | |
Merge pull request #193 from N00byKing/3184_2_robotic_boogaloo
Implement Pull #3184 from citra: core/arm: Improve timing accuracy before service calls in JIT (Rebased)
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 162c766fd..bd98cb160 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" |
| @@ -153,6 +154,14 @@ void ARM_Unicorn::SetTlsAddress(VAddr base) { | |||
| 153 | CHECKED(uc_reg_write(uc, UC_ARM64_REG_TPIDRRO_EL0, &base)); | 154 | CHECKED(uc_reg_write(uc, UC_ARM64_REG_TPIDRRO_EL0, &base)); |
| 154 | } | 155 | } |
| 155 | 156 | ||
| 157 | void ARM_Unicorn::Run() { | ||
| 158 | ExecuteInstructions(std::max(CoreTiming::GetDowncount(), 0)); | ||
| 159 | } | ||
| 160 | |||
| 161 | void ARM_Unicorn::Step() { | ||
| 162 | ExecuteInstructions(1); | ||
| 163 | } | ||
| 164 | |||
| 156 | MICROPROFILE_DEFINE(ARM_Jit, "ARM JIT", "ARM JIT", MP_RGB(255, 64, 64)); | 165 | MICROPROFILE_DEFINE(ARM_Jit, "ARM JIT", "ARM JIT", MP_RGB(255, 64, 64)); |
| 157 | 166 | ||
| 158 | void ARM_Unicorn::ExecuteInstructions(int num_instructions) { | 167 | 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 00b5b1865..b99b58e4c 100644 --- a/src/core/arm/unicorn/arm_unicorn.h +++ b/src/core/arm/unicorn/arm_unicorn.h | |||
| @@ -30,7 +30,9 @@ public: | |||
| 30 | void SaveContext(ThreadContext& ctx) override; | 30 | void SaveContext(ThreadContext& ctx) override; |
| 31 | void LoadContext(const ThreadContext& ctx) override; | 31 | void LoadContext(const ThreadContext& ctx) override; |
| 32 | void PrepareReschedule() override; | 32 | void PrepareReschedule() override; |
| 33 | void ExecuteInstructions(int num_instructions) override; | 33 | void ExecuteInstructions(int num_instructions); |
| 34 | void Run() override; | ||
| 35 | void Step() override; | ||
| 34 | void ClearInstructionCache() override; | 36 | void ClearInstructionCache() override; |
| 35 | void PageTableChanged() override{}; | 37 | void PageTableChanged() override{}; |
| 36 | 38 | ||