From 7fd598636e819d4e86874b20081945936a05c5f1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 24 Sep 2018 10:29:56 -0400 Subject: memory: Dehardcode the use of a 36-bit address space Given games can also request a 32-bit or 39-bit address space, we shouldn't be hardcoding the address space range as 36-bit. --- src/core/arm/dynarmic/arm_dynarmic.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/arm/dynarmic') diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index 7be5a38de..928bbc096 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -129,7 +129,8 @@ public: }; std::unique_ptr ARM_Dynarmic::MakeJit() const { - auto** const page_table = Core::CurrentProcess()->vm_manager.page_table.pointers.data(); + auto& current_process = Core::CurrentProcess(); + auto** const page_table = current_process->vm_manager.page_table.pointers.data(); Dynarmic::A64::UserConfig config; @@ -138,7 +139,7 @@ std::unique_ptr ARM_Dynarmic::MakeJit() const { // Memory config.page_table = reinterpret_cast(page_table); - config.page_table_address_space_bits = Memory::ADDRESS_SPACE_BITS; + config.page_table_address_space_bits = current_process->vm_manager.GetAddressSpaceWidth(); config.silently_mirror_page_table = false; // Multi-process state -- cgit v1.2.3