diff options
author | bunnei <bunneidev@gmail.com> | 2021-03-21 23:25:25 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-03-21 23:25:25 +0100 |
commit | a35717b245b7acb2383c4d0e03cd88e9c2d8d9ce (patch) | |
tree | 779a5da71319f710f6b9ee72ea443044707c3d82 /src/core/arm/dynarmic | |
parent | Merge pull request #6052 from Morph1984/vi-getindirectlayerimagemap (diff) | |
download | yuzu-a35717b245b7acb2383c4d0e03cd88e9c2d8d9ce.tar yuzu-a35717b245b7acb2383c4d0e03cd88e9c2d8d9ce.tar.gz yuzu-a35717b245b7acb2383c4d0e03cd88e9c2d8d9ce.tar.bz2 yuzu-a35717b245b7acb2383c4d0e03cd88e9c2d8d9ce.tar.lz yuzu-a35717b245b7acb2383c4d0e03cd88e9c2d8d9ce.tar.xz yuzu-a35717b245b7acb2383c4d0e03cd88e9c2d8d9ce.tar.zst yuzu-a35717b245b7acb2383c4d0e03cd88e9c2d8d9ce.zip |
Diffstat (limited to 'src/core/arm/dynarmic')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_32.cpp | 5 | ||||
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_64.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index ec4407b6e..53d78de32 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp @@ -306,13 +306,18 @@ void ARM_Dynarmic_32::ClearExclusiveState() { void ARM_Dynarmic_32::PageTableChanged(Common::PageTable& page_table, std::size_t new_address_space_size_in_bits) { + ThreadContext32 ctx{}; + SaveContext(ctx); + auto key = std::make_pair(&page_table, new_address_space_size_in_bits); auto iter = jit_cache.find(key); if (iter != jit_cache.end()) { jit = iter->second; + LoadContext(ctx); return; } jit = MakeJit(page_table, new_address_space_size_in_bits); + LoadContext(ctx); jit_cache.emplace(key, jit); } diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index ae5566ab8..b36b7d918 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp @@ -348,13 +348,18 @@ void ARM_Dynarmic_64::ClearExclusiveState() { void ARM_Dynarmic_64::PageTableChanged(Common::PageTable& page_table, std::size_t new_address_space_size_in_bits) { + ThreadContext64 ctx{}; + SaveContext(ctx); + auto key = std::make_pair(&page_table, new_address_space_size_in_bits); auto iter = jit_cache.find(key); if (iter != jit_cache.end()) { jit = iter->second; + LoadContext(ctx); return; } jit = MakeJit(page_table, new_address_space_size_in_bits); + LoadContext(ctx); jit_cache.emplace(key, jit); } |