mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 15:32:04 +00:00
Figure out what the call to perform
should look like.
Albeit that this class doesn't currently offer any of the proper flow control actions.
This commit is contained in:
parent
43cd740a7b
commit
df999978f1
@ -8,6 +8,10 @@
|
||||
|
||||
#include "Executor.hpp"
|
||||
|
||||
#include "Perform.hpp"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
using namespace InstructionSet::M68k;
|
||||
|
||||
template <Model model, typename BusHandler>
|
||||
@ -17,7 +21,7 @@ Executor<model, BusHandler>::Executor(BusHandler &handler) : bus_handler_(handle
|
||||
|
||||
template <Model model, typename BusHandler>
|
||||
void Executor<model, BusHandler>::reset() {
|
||||
|
||||
// TODO.
|
||||
}
|
||||
|
||||
template <Model model, typename BusHandler>
|
||||
@ -33,9 +37,20 @@ void Executor<model, BusHandler>::run_for_instructions(int count) {
|
||||
// Obtain the appropriate sequence.
|
||||
Sequence<model> sequence(instruction.operation);
|
||||
|
||||
// Temporary storage.
|
||||
CPU::SlicedInt32 source, dest;
|
||||
|
||||
// Perform it.
|
||||
while(!sequence.empty()) {
|
||||
const auto step = sequence.pop_front();
|
||||
|
||||
switch(step) {
|
||||
default: assert(false); // i.e. TODO
|
||||
|
||||
case Step::Perform:
|
||||
perform<model>(instruction, source, dest, status_, this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user