micro opt
This commit is contained in:
parent
d88a134619
commit
1d2f3a7a3a
3 changed files with 5 additions and 3 deletions
|
@ -114,7 +114,9 @@ endif (WIN32)
|
||||||
include(CheckIPOSupported)
|
include(CheckIPOSupported)
|
||||||
check_ipo_supported(RESULT supported)
|
check_ipo_supported(RESULT supported)
|
||||||
set(CMAKE_BUILD_TYPE RelWithDebInfo)
|
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_BUILD_TYPE Debug)
|
||||||
|
|
||||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||||
|
|
2
mmu.cpp
2
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)
|
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);
|
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;
|
return;
|
||||||
|
|
||||||
if (is_write)
|
if (is_write)
|
||||||
|
|
2
mmu.h
2
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_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_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; }
|
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;
|
bool get_use_data_space(const int run_mode) const;
|
||||||
uint32_t get_io_base() const { return is_enabled() ? (getMMR3() & 16 ? 017760000 : 0760000) : 0160000; }
|
uint32_t get_io_base() const { return is_enabled() ? (getMMR3() & 16 ? 017760000 : 0760000) : 0160000; }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue