Bus: 16KB page compatibility for mmap fastmem

This commit is contained in:
Stenzek
2023-09-20 22:57:24 +10:00
parent 5bbb7cf906
commit 3c68543491
23 changed files with 666 additions and 687 deletions

View File

@@ -88,6 +88,17 @@ using u32 = uint32_t;
using s64 = int64_t;
using u64 = uint64_t;
// Host page sizes.
#if defined(__APPLE__) && defined(__aarch64__)
static constexpr u32 HOST_PAGE_SIZE = 0x4000;
static constexpr u32 HOST_PAGE_MASK = HOST_PAGE_SIZE - 1;
static constexpr u32 HOST_PAGE_SHIFT = 14;
#else
static constexpr u32 HOST_PAGE_SIZE = 0x1000;
static constexpr u32 HOST_PAGE_MASK = HOST_PAGE_SIZE - 1;
static constexpr u32 HOST_PAGE_SHIFT = 12;
#endif
// Enable use of static_assert in constexpr if
template<class T>
struct dependent_false : std::false_type