From 7d9b1973839277f9635d2f338adc50876a01d834 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 1 Jun 2017 18:28:04 -0400 Subject: [PATCH] Pulled the .get() call for fetch-decode-execute out of the main loop. --- Processors/Z80/Z80.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Processors/Z80/Z80.hpp b/Processors/Z80/Z80.hpp index 6e8626462..66ac4c2b3 100644 --- a/Processors/Z80/Z80.hpp +++ b/Processors/Z80/Z80.hpp @@ -190,6 +190,7 @@ template class Processor: public MicroOpScheduler { std::vector instructions; std::vector all_operations; std::vector fetch_decode_execute; + MicroOp *fetch_decode_execute_data; uint8_t r_step_; InstructionPage() : r_step_(1) {} @@ -626,6 +627,7 @@ template class Processor: public MicroOpScheduler { target.fetch_decode_execute[0] = fetch_decode_execute[0]; target.fetch_decode_execute[1] = fetch_decode_execute[1]; target.fetch_decode_execute[2] = fetch_decode_execute[2]; + target.fetch_decode_execute_data = target.fetch_decode_execute.data(); } public: @@ -671,7 +673,7 @@ template class Processor: public MicroOpScheduler { #define advance_operation() \ current_instruction_page_ = &base_page_; \ - scheduled_program_counter_ = base_page_.fetch_decode_execute.data(); + scheduled_program_counter_ = base_page_.fetch_decode_execute_data; number_of_cycles_ += number_of_cycles; if(!scheduled_program_counter_) { @@ -1382,7 +1384,7 @@ template class Processor: public MicroOpScheduler { case MicroOp::SetInstructionPage: current_instruction_page_ = (InstructionPage *)operation->source; - scheduled_program_counter_ = current_instruction_page_->fetch_decode_execute.data(); + scheduled_program_counter_ = current_instruction_page_->fetch_decode_execute_data; break; case MicroOp::CalculateIndexAddress: