diff --git a/benchmark.txt b/benchmark.txt new file mode 100644 index 0000000..ca424ca --- /dev/null +++ b/benchmark.txt @@ -0,0 +1,2 @@ +41ef37ce6b7f13f1cc2df0e6ac570647fe07fe12: +MIPS: 0.74, relative speed: 33.23%, instructions executed: 3692600 in 5.00 seconds diff --git a/cpu.cpp b/cpu.cpp index 2367288..f342790 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -702,7 +702,6 @@ bool cpu::double_operand_instructions(const uint16_t instr) case 0b110: { // ADD/SUB Add/Subtract Word auto g_ssrc = getGAM(src_mode, src_reg, wm_word); - auto g_dst = getGAM(dst_mode, dst_reg, wm_word); addToMMR1(g_dst); diff --git a/mmu.cpp b/mmu.cpp index aa29885..d34a345 100644 --- a/mmu.cpp +++ b/mmu.cpp @@ -324,7 +324,7 @@ std::pair mmu::get_trap_action(const int run_mode, const boo assert(map[1][false] == T_TRAP_250); assert(map[1][true ] == T_ABORT_4 ); - return { map[access_control][is_write], access_control }; + return { map[access_control][is_write], access_control }; } void mmu::mmudebug(const uint16_t a) @@ -464,7 +464,6 @@ uint32_t mmu::calculate_physical_address(const int run_mode, const uint16_t a, c bool d = space == d_space && get_use_data_space(run_mode); uint16_t p_offset = a & 8191; // page offset - uint8_t apf = a >> 13; // active page field m_offset = get_physical_memory_offset(run_mode, d, apf); diff --git a/mmu.h b/mmu.h index 6f4e92a..55e72c7 100644 --- a/mmu.h +++ b/mmu.h @@ -47,16 +47,16 @@ private: // 8 pages, D/I, 3 modes and 1 invalid mode page_t pages[4][2][8]; - uint16_t MMR0 { 0 }; - uint16_t MMR1 { 0 }; - uint16_t MMR2 { 0 }; - uint16_t MMR3 { 0 }; + uint16_t MMR0 { 0 }; + uint16_t MMR1 { 0 }; + uint16_t MMR2 { 0 }; + uint16_t MMR3 { 0 }; uint16_t CPUERR { 0 }; - uint16_t PIR { 0 }; - uint16_t CSR { 0 }; + uint16_t PIR { 0 }; + uint16_t CSR { 0 }; - memory *m { nullptr }; - cpu *c { nullptr }; + memory *m { nullptr }; + cpu *c { nullptr }; JsonDocument add_par_pdr(const int run_mode, const bool is_d) const; void set_par_pdr(const JsonVariantConst j_in, const int run_mode, const bool is_d);