1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Edging back towards shifting things to the stack.

This commit is contained in:
Thomas Harte 2016-03-24 19:17:44 -04:00
parent 3ca58b2a57
commit 738186e323

View File

@ -550,6 +550,7 @@ template <class T> class Processor {
// to date in this stack frame only); which saves some complicated addressing
unsigned int scheduleProgramsReadPointer = _scheduleProgramsReadPointer;
unsigned int scheduleProgramProgramCounter = _scheduleProgramProgramCounter;
uint8_t operation = _operation;
#define checkSchedule(op) \
if(!_scheduledPrograms[scheduleProgramsReadPointer]) {\
@ -600,7 +601,7 @@ template <class T> class Processor {
case CycleFetchOperation: {
_lastOperationPC = _pc;
_pc.full++;
read_op(_operation, _lastOperationPC.full);
read_op(operation, _lastOperationPC.full);
// static int last_cycles_left_to_run = 0;
// static bool printed_map[256] = {false};
@ -619,7 +620,7 @@ template <class T> class Processor {
break;
case OperationDecodeOperation:
decode_operation(_operation);
decode_operation(operation);
break;
case OperationMoveToNextProgram:
@ -1047,6 +1048,7 @@ template <class T> class Processor {
_cycles_left_to_run = number_of_cycles;
_scheduleProgramsReadPointer = scheduleProgramsReadPointer;
_scheduleProgramProgramCounter = scheduleProgramProgramCounter;
_operation = operation;
}
}