mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-15 14:50:05 +00:00
core: arm_dynarmic: Ensure JIT state is saved/restored on page table changes.
- We re-create the JIT here without preserving any state.
This commit is contained in:
parent
2e85ee250d
commit
a35717b245
@ -306,13 +306,18 @@ void ARM_Dynarmic_32::ClearExclusiveState() {
|
|||||||
|
|
||||||
void ARM_Dynarmic_32::PageTableChanged(Common::PageTable& page_table,
|
void ARM_Dynarmic_32::PageTableChanged(Common::PageTable& page_table,
|
||||||
std::size_t new_address_space_size_in_bits) {
|
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 key = std::make_pair(&page_table, new_address_space_size_in_bits);
|
||||||
auto iter = jit_cache.find(key);
|
auto iter = jit_cache.find(key);
|
||||||
if (iter != jit_cache.end()) {
|
if (iter != jit_cache.end()) {
|
||||||
jit = iter->second;
|
jit = iter->second;
|
||||||
|
LoadContext(ctx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
jit = MakeJit(page_table, new_address_space_size_in_bits);
|
jit = MakeJit(page_table, new_address_space_size_in_bits);
|
||||||
|
LoadContext(ctx);
|
||||||
jit_cache.emplace(key, jit);
|
jit_cache.emplace(key, jit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,13 +348,18 @@ void ARM_Dynarmic_64::ClearExclusiveState() {
|
|||||||
|
|
||||||
void ARM_Dynarmic_64::PageTableChanged(Common::PageTable& page_table,
|
void ARM_Dynarmic_64::PageTableChanged(Common::PageTable& page_table,
|
||||||
std::size_t new_address_space_size_in_bits) {
|
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 key = std::make_pair(&page_table, new_address_space_size_in_bits);
|
||||||
auto iter = jit_cache.find(key);
|
auto iter = jit_cache.find(key);
|
||||||
if (iter != jit_cache.end()) {
|
if (iter != jit_cache.end()) {
|
||||||
jit = iter->second;
|
jit = iter->second;
|
||||||
|
LoadContext(ctx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
jit = MakeJit(page_table, new_address_space_size_in_bits);
|
jit = MakeJit(page_table, new_address_space_size_in_bits);
|
||||||
|
LoadContext(ctx);
|
||||||
jit_cache.emplace(key, jit);
|
jit_cache.emplace(key, jit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user