From 73f340586d12e478e6ec69a6c338536b36fb8492 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 2 May 2022 07:45:07 -0400 Subject: [PATCH] Proceed to building, but failing tests. --- InstructionSets/M68k/Executor.hpp | 9 +++++++++ .../Implementation/ExecutorImplementation.hpp | 17 +++++++++++++++++ .../Implementation/PerformImplementation.hpp | 4 +++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/InstructionSets/M68k/Executor.hpp b/InstructionSets/M68k/Executor.hpp index 736acf398..c6e2ef73e 100644 --- a/InstructionSets/M68k/Executor.hpp +++ b/InstructionSets/M68k/Executor.hpp @@ -37,6 +37,15 @@ template class Executor { /// will not necessarily take effect immediately when signalled. void run_for_instructions(int); + + // Flow control. + void consume_cycles(int) {} + void raise_exception(int); + void stop(); + void set_pc(uint32_t); + void add_pc(uint32_t); + void decline_branch(); + private: BusHandler &bus_handler_; Predecoder decoder_; diff --git a/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp b/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp index 99f91e013..61e895c9a 100644 --- a/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp +++ b/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp @@ -277,6 +277,23 @@ void Executor::run_for_instructions(int count) { } } +// TODO: flow control, all below here. + +template +void Executor::raise_exception(int) {} + +template +void Executor::stop() {} + +template +void Executor::set_pc(uint32_t) {} + +template +void Executor::add_pc(uint32_t) {} + +template +void Executor::decline_branch() {} + } } diff --git a/InstructionSets/M68k/Implementation/PerformImplementation.hpp b/InstructionSets/M68k/Implementation/PerformImplementation.hpp index 525135228..8af76d549 100644 --- a/InstructionSets/M68k/Implementation/PerformImplementation.hpp +++ b/InstructionSets/M68k/Implementation/PerformImplementation.hpp @@ -905,6 +905,8 @@ template < sbcd(); } break; +#undef sbcd + // EXG and SWAP exchange/swap words or long words. case Operation::EXG: { @@ -1182,7 +1184,7 @@ template < #undef set_flags_w #undef set_flags_l #undef set_neg_zero_overflow -#undef set_net_zero +#undef set_neg_zero /* RTE and RTR share an implementation.