mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-07 15:08:22 +01:00
Optimization: Read page-table directly for memory access
This commit is contained in:
parent
57169ec093
commit
3b5c43b427
5 changed files with 219 additions and 27 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue