1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-01 14:29:51 +00:00

Fixed usage of flush: the subclass version is definitively used.

This commit is contained in:
Thomas Harte 2017-06-06 17:52:44 -04:00
parent ca9e8aecd6
commit b55579c348

View File

@ -776,7 +776,7 @@ template <class T> class Processor {
static MachineCycle bus_acknowledge_cycle = {BusOperation::BusAcknowledge, 1};
number_of_cycles_ -= static_cast<T *>(this)->perform_machine_cycle(bus_acknowledge_cycle) + 1;
if(!number_of_cycles_) {
flush();
static_cast<T *>(this)->flush();
return;
}
}
@ -793,7 +793,11 @@ template <class T> class Processor {
switch(operation->type) {
case MicroOp::BusOperation:
if(number_of_cycles_ < operation->machine_cycle.length) { scheduled_program_counter_--; flush(); return; }
if(number_of_cycles_ < operation->machine_cycle.length) {
scheduled_program_counter_--;
static_cast<T *>(this)->flush();
return;
}
number_of_cycles_ -= operation->machine_cycle.length;
last_request_status_ = request_status_;
number_of_cycles_ -= static_cast<T *>(this)->perform_machine_cycle(operation->machine_cycle);