Optimization: Read page-table directly for memory access

This commit is contained in:
MerryMage 2016-09-01 00:06:40 +01:00
parent 57169ec093
commit 3b5c43b427
5 changed files with 219 additions and 27 deletions

View file

@ -6,6 +6,8 @@
#pragma once
#include <array>
#include <cstddef>
#include <cstdint>
namespace Dynarmic {
@ -30,6 +32,11 @@ struct UserCallbacks {
void (*InterpreterFallback)(std::uint32_t pc, Jit* jit);
bool (*CallSVC)(std::uint32_t swi);
// Page Table
static constexpr std::size_t PAGE_BITS = 12;
static constexpr std::size_t NUM_PAGE_TABLE_ENTRIES = 1 << (32 - PAGE_BITS);
std::array<std::uint8_t*, NUM_PAGE_TABLE_ENTRIES>* page_table = nullptr;
};
} // namespace Dynarmic