micro opt of mmu::verify_page_length
This commit is contained in:
parent
b97deba567
commit
8b7057a9c0
1 changed files with 1 additions and 2 deletions
3
mmu.cpp
3
mmu.cpp
|
@ -442,7 +442,7 @@ void mmu::verify_page_length(cpu *const c, const uint16_t virt_addr, const int r
|
||||||
|
|
||||||
bool direction = get_pdr_direction(run_mode, d, apf);
|
bool direction = get_pdr_direction(run_mode, d, apf);
|
||||||
|
|
||||||
if ((pdr_cmp > pdr_len && direction == false) || (pdr_cmp < pdr_len && direction == true)) [[unlikely]] {
|
if (direction == false ? pdr_cmp > pdr_len : pdr_cmp < pdr_len) [[unlikely]] {
|
||||||
TRACE("mmu::calculate_physical_address::p_offset %o versus %o direction %d", pdr_cmp, pdr_len, direction);
|
TRACE("mmu::calculate_physical_address::p_offset %o versus %o direction %d", pdr_cmp, pdr_len, direction);
|
||||||
TRACE("TRAP(0250) (throw 7) on address %06o", virt_addr);
|
TRACE("TRAP(0250) (throw 7) on address %06o", virt_addr);
|
||||||
|
|
||||||
|
@ -485,7 +485,6 @@ uint32_t mmu::calculate_physical_address(cpu *const c, const int run_mode, const
|
||||||
uint16_t p_offset = a & 8191; // page offset
|
uint16_t p_offset = a & 8191; // page offset
|
||||||
|
|
||||||
m_offset = get_physical_memory_offset(run_mode, d, apf);
|
m_offset = get_physical_memory_offset(run_mode, d, apf);
|
||||||
|
|
||||||
m_offset += p_offset;
|
m_offset += p_offset;
|
||||||
|
|
||||||
if ((getMMR3() & 16) == 0) // off is 18bit
|
if ((getMMR3() & 16) == 0) // off is 18bit
|
||||||
|
|
Loading…
Add table
Reference in a new issue