diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-26 20:53:47 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-26 20:53:47 +0100 |
commit | f3d4d4eaa82d8a66f77c814c21f9d75d108de445 (patch) | |
tree | dca3684caabc7bc100551a0897bf4d95a9584ce4 /src/core/arm/dynarmic/arm_dynarmic.h | |
parent | Merge pull request #3425 from ReinUsesLisp/layered-framebuffer (diff) | |
download | yuzu-f3d4d4eaa82d8a66f77c814c21f9d75d108de445.tar yuzu-f3d4d4eaa82d8a66f77c814c21f9d75d108de445.tar.gz yuzu-f3d4d4eaa82d8a66f77c814c21f9d75d108de445.tar.bz2 yuzu-f3d4d4eaa82d8a66f77c814c21f9d75d108de445.tar.lz yuzu-f3d4d4eaa82d8a66f77c814c21f9d75d108de445.tar.xz yuzu-f3d4d4eaa82d8a66f77c814c21f9d75d108de445.tar.zst yuzu-f3d4d4eaa82d8a66f77c814c21f9d75d108de445.zip |
Diffstat (limited to 'src/core/arm/dynarmic/arm_dynarmic.h')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.h b/src/core/arm/dynarmic/arm_dynarmic.h index 9cd475cfb..ffbb69d76 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.h +++ b/src/core/arm/dynarmic/arm_dynarmic.h @@ -5,9 +5,12 @@ #pragma once #include <memory> +#include <unordered_map> + #include <dynarmic/A64/a64.h> #include <dynarmic/A64/exclusive_monitor.h> #include "common/common_types.h" +#include "common/hash.h" #include "core/arm/arm_interface.h" #include "core/arm/exclusive_monitor.h" #include "core/arm/unicorn/arm_unicorn.h" @@ -22,6 +25,10 @@ class ARM_Dynarmic_Callbacks; class DynarmicExclusiveMonitor; class System; +using JitCacheKey = std::pair<Common::PageTable*, std::size_t>; +using JitCacheType = + std::unordered_map<JitCacheKey, std::shared_ptr<Dynarmic::A64::Jit>, Common::PairHash>; + class ARM_Dynarmic final : public ARM_Interface { public: ARM_Dynarmic(System& system, ExclusiveMonitor& exclusive_monitor, std::size_t core_index); @@ -53,12 +60,13 @@ public: std::size_t new_address_space_size_in_bits) override; private: - std::unique_ptr<Dynarmic::A64::Jit> MakeJit(Common::PageTable& page_table, + std::shared_ptr<Dynarmic::A64::Jit> MakeJit(Common::PageTable& page_table, std::size_t address_space_bits) const; friend class ARM_Dynarmic_Callbacks; std::unique_ptr<ARM_Dynarmic_Callbacks> cb; - std::unique_ptr<Dynarmic::A64::Jit> jit; + JitCacheType jit_cache; + std::shared_ptr<Dynarmic::A64::Jit> jit; ARM_Unicorn inner_unicorn; std::size_t core_index; |