diff --git a/CMakeLists.txt b/CMakeLists.txt index f158cf7..82a363e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,9 @@ endif (WIN32) include(CheckIPOSupported) check_ipo_supported(RESULT supported) set(CMAKE_BUILD_TYPE RelWithDebInfo) -set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE) +cmake_policy(SET CMP0069 NEW) +set(CMAKE_POLICY_DEFAULT_CMP0069 NEW) +set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) #set(CMAKE_BUILD_TYPE Debug) set(CMAKE_THREAD_PREFER_PTHREAD TRUE) diff --git a/mmu.cpp b/mmu.cpp index 0733fba..aa29885 100644 --- a/mmu.cpp +++ b/mmu.cpp @@ -341,7 +341,7 @@ void mmu::mmudebug(const uint16_t a) void mmu::verify_page_access(const uint16_t virt_addr, const int run_mode, const bool d, const int apf, const bool is_write) { const auto [ trap_action, access_control ] = get_trap_action(run_mode, d, apf, is_write); - if (trap_action == T_PROCEED) + if (trap_action == T_PROCEED) [[likely]] return; if (is_write) diff --git a/mmu.h b/mmu.h index 3e5be67..6f4e92a 100644 --- a/mmu.h +++ b/mmu.h @@ -89,7 +89,7 @@ public: int get_access_control (const int run_mode, const bool d, const int apf) { return pages[run_mode][d][apf].pdr & 7; } int get_pdr_len (const int run_mode, const bool d, const int apf) { return (pages[run_mode][d][apf].pdr >> 8) & 127; } int get_pdr_direction (const int run_mode, const bool d, const int apf) { return pages[run_mode][d][apf].pdr & 8; } - uint32_t get_physical_memory_offset(const int run_mode, const bool d, const int apf) const { return pages[run_mode][d][apf].par << 6; } + uint32_t get_physical_memory_offset(const int run_mode, const bool d, const int apf) const { return pages[run_mode][d][apf].par * 64; } bool get_use_data_space(const int run_mode) const; uint32_t get_io_base() const { return is_enabled() ? (getMMR3() & 16 ? 017760000 : 0760000) : 0160000; }