From bfd0b683bf9b682cb9f2e432d89c061c31ccdec5 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 14 Jun 2022 17:04:11 -0400 Subject: [PATCH] Extend MOVE.b fix to cover MOVE.w. --- .../Implementation/68000Mk2Implementation.hpp | 81 ++++++++++++------- 1 file changed, 53 insertions(+), 28 deletions(-) diff --git a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp index 025ad01d7..60d3fe521 100644 --- a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp +++ b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp @@ -192,11 +192,17 @@ enum ExecutionState: int { PEA_np_nS_ns, // Used to complete (An), (d16, [An/PC]) and (d8, [An/PC], Xn). PEA_np_nS_ns_np, // Used to complete (xxx).w and (xxx).l - AddressingDispatch(MOVE_b), MOVE_b_AbsoluteLong_prefetch_first, + MOVE_b, MOVE_w, + AddressingDispatch(MOVE_bw), MOVE_bw_AbsoluteLong_prefetch_first, }; #undef AddressingDispatch +/// @returns The proper select lines for @c instruction's operand size, assuming it is either byte or word. +template Microcycle::OperationT data_select(const InstructionT &instruction) { + return Microcycle::OperationT(1 << int(instruction.operand_size())); +} + // MARK: - The state machine. template @@ -748,7 +754,7 @@ void Processor