diff options
author | James Rowe <jroweboy@gmail.com> | 2019-02-16 03:52:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-16 03:52:11 +0100 |
commit | 99da6362c43a24c608a2790f668f10a62e3b80a6 (patch) | |
tree | 6257ac07283ebb4ea5ac622784cc7a041d48f8b1 /src/core/arm/dynarmic/arm_dynarmic.cpp | |
parent | Merge pull request #2112 from lioncash/shadowing (diff) | |
parent | core_timing: Convert core timing into a class (diff) | |
download | yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.gz yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.bz2 yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.lz yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.xz yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.zst yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.zip |
Diffstat (limited to 'src/core/arm/dynarmic/arm_dynarmic.cpp')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index f28951f8a..9b7ca4030 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -112,14 +112,14 @@ public: // Always execute at least one tick. amortized_ticks = std::max<u64>(amortized_ticks, 1); - Timing::AddTicks(amortized_ticks); + parent.core_timing.AddTicks(amortized_ticks); num_interpreted_instructions = 0; } u64 GetTicksRemaining() override { - return std::max(Timing::GetDowncount(), 0); + return std::max(parent.core_timing.GetDowncount(), 0); } u64 GetCNTPCT() override { - return Timing::GetTicks(); + return parent.core_timing.GetTicks(); } ARM_Dynarmic& parent; @@ -172,8 +172,10 @@ void ARM_Dynarmic::Step() { cb->InterpreterFallback(jit->GetPC(), 1); } -ARM_Dynarmic::ARM_Dynarmic(ExclusiveMonitor& exclusive_monitor, std::size_t core_index) - : cb(std::make_unique<ARM_Dynarmic_Callbacks>(*this)), core_index{core_index}, +ARM_Dynarmic::ARM_Dynarmic(Timing::CoreTiming& core_timing, ExclusiveMonitor& exclusive_monitor, + std::size_t core_index) + : cb(std::make_unique<ARM_Dynarmic_Callbacks>(*this)), inner_unicorn{core_timing}, + core_index{core_index}, core_timing{core_timing}, exclusive_monitor{dynamic_cast<DynarmicExclusiveMonitor&>(exclusive_monitor)} { ThreadContext ctx{}; inner_unicorn.SaveContext(ctx); |