diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-08-08 02:30:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 02:30:57 +0200 |
commit | 30515b3b2788b34610bfbda5ad3bc327660d7213 (patch) | |
tree | c8857cb5a242148b017948793ab0f8a5910e4787 /src/core/arm/dynarmic | |
parent | Merge pull request #8730 from lat9nq/fmt-9.0.0 (diff) | |
parent | core/arm: increase minimum_run_cycles (diff) | |
download | yuzu-30515b3b2788b34610bfbda5ad3bc327660d7213.tar yuzu-30515b3b2788b34610bfbda5ad3bc327660d7213.tar.gz yuzu-30515b3b2788b34610bfbda5ad3bc327660d7213.tar.bz2 yuzu-30515b3b2788b34610bfbda5ad3bc327660d7213.tar.lz yuzu-30515b3b2788b34610bfbda5ad3bc327660d7213.tar.xz yuzu-30515b3b2788b34610bfbda5ad3bc327660d7213.tar.zst yuzu-30515b3b2788b34610bfbda5ad3bc327660d7213.zip |
Diffstat (limited to 'src/core/arm/dynarmic')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_32.cpp | 15 | ||||
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_64.cpp | 15 |
2 files changed, 22 insertions, 8 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index b8d2ce224..99fab6384 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp @@ -125,7 +125,9 @@ public: } void AddTicks(u64 ticks) override { - ASSERT_MSG(!parent.uses_wall_clock, "This should never happen - dynarmic ticking disabled"); + if (parent.uses_wall_clock) { + return; + } // Divide the number of ticks by the amount of CPU cores. TODO(Subv): This yields only a // rough approximation of the amount of executed ticks in the system, it may be thrown off @@ -142,7 +144,12 @@ public: } u64 GetTicksRemaining() override { - ASSERT_MSG(!parent.uses_wall_clock, "This should never happen - dynarmic ticking disabled"); + if (parent.uses_wall_clock) { + if (!parent.interrupt_handlers[parent.core_index].IsInterrupted()) { + return minimum_run_cycles; + } + return 0U; + } return std::max<s64>(parent.system.CoreTiming().GetDowncount(), 0); } @@ -172,7 +179,7 @@ public: Core::Memory::Memory& memory; std::size_t num_interpreted_instructions{}; bool debugger_enabled{}; - static constexpr u64 minimum_run_cycles = 1000U; + static constexpr u64 minimum_run_cycles = 10000U; }; std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable* page_table) const { @@ -200,7 +207,7 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable* // Timing config.wall_clock_cntpct = uses_wall_clock; - config.enable_cycle_counting = !uses_wall_clock; + config.enable_cycle_counting = true; // Code cache size config.code_cache_size = 512_MiB; diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index 1a4d37cbc..a91b587ce 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp @@ -166,7 +166,9 @@ public: } void AddTicks(u64 ticks) override { - ASSERT_MSG(!parent.uses_wall_clock, "This should never happen - dynarmic ticking disabled"); + if (parent.uses_wall_clock) { + return; + } // Divide the number of ticks by the amount of CPU cores. TODO(Subv): This yields only a // rough approximation of the amount of executed ticks in the system, it may be thrown off @@ -181,7 +183,12 @@ public: } u64 GetTicksRemaining() override { - ASSERT_MSG(!parent.uses_wall_clock, "This should never happen - dynarmic ticking disabled"); + if (parent.uses_wall_clock) { + if (!parent.interrupt_handlers[parent.core_index].IsInterrupted()) { + return minimum_run_cycles; + } + return 0U; + } return std::max<s64>(parent.system.CoreTiming().GetDowncount(), 0); } @@ -216,7 +223,7 @@ public: u64 tpidrro_el0 = 0; u64 tpidr_el0 = 0; bool debugger_enabled{}; - static constexpr u64 minimum_run_cycles = 1000U; + static constexpr u64 minimum_run_cycles = 10000U; }; std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable* page_table, @@ -260,7 +267,7 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable* // Timing config.wall_clock_cntpct = uses_wall_clock; - config.enable_cycle_counting = !uses_wall_clock; + config.enable_cycle_counting = true; // Code cache size config.code_cache_size = 512_MiB; |