From 9a82f028aa4323da8122e7d7c7939972efa2df8a Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 20 Mar 2016 22:52:49 -0400 Subject: [PATCH] `operation` is now also stack local. --- Processors/6502/CPU6502.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Processors/6502/CPU6502.hpp b/Processors/6502/CPU6502.hpp index ce414db0a..5062c2214 100644 --- a/Processors/6502/CPU6502.hpp +++ b/Processors/6502/CPU6502.hpp @@ -551,6 +551,7 @@ template class Processor { unsigned int scheduleProgramsReadPointer = _scheduleProgramsReadPointer; unsigned int scheduleProgramProgramCounter = _scheduleProgramProgramCounter; uint8_t operand = _operand; + uint8_t operation = _operation; #define checkSchedule(op) \ if(!_scheduledPrograms[scheduleProgramsReadPointer]) {\ @@ -601,7 +602,7 @@ template 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}; @@ -620,7 +621,7 @@ template class Processor { break; case OperationDecodeOperation: - decode_operation(_operation); + decode_operation(operation); break; case OperationMoveToNextProgram: @@ -1049,6 +1050,7 @@ template class Processor { _scheduleProgramsReadPointer = scheduleProgramsReadPointer; _scheduleProgramProgramCounter = scheduleProgramProgramCounter; _operand = operand; + _operation = operation; } }