From cabf1a052cc0c2443c909bd0f50bbc65c8d183c1 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 27 Oct 2022 09:39:00 -0400 Subject: [PATCH] Fill in operand sizes and flags for the 68010 extensions. --- .../M68k/Implementation/InstructionOperandFlags.hpp | 11 +++++++++++ .../M68k/Implementation/InstructionOperandSize.hpp | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp b/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp index cc186ebe1..b4ade6adc 100644 --- a/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp +++ b/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp @@ -26,6 +26,14 @@ template constexpr uint8_t operand_flags(Op case Operation::MOVEPw: case Operation::MOVEPl: case Operation::TAS: case Operation::RTR: case Operation::RTS: case Operation::RTE: + case Operation::RTD: + return 0; + + // + // Operand fetch/store status isn't certain just from the operation; this means + // that further content from an extension word will be required. + // + case Operation::MOVESb: case Operation::MOVESw: case Operation::MOVESl: return 0; // @@ -40,12 +48,15 @@ template constexpr uint8_t operand_flags(Op case Operation::TSTb: case Operation::TSTw: case Operation::TSTl: case Operation::MOVEMtoMw: case Operation::MOVEMtoMl: case Operation::MOVEMtoRw: case Operation::MOVEMtoRl: + case Operation::MOVEtoC: return FetchOp1; // // Single-operand write. // case Operation::MOVEfromUSP: + case Operation::MOVEfromCCR: + case Operation::MOVEfromC: return StoreOp1; // diff --git a/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp b/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp index e9898d200..44e07011e 100644 --- a/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp +++ b/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp @@ -22,15 +22,19 @@ constexpr DataSize operand_size(Operation r_operation) { case Operation::STOP: case Operation::RESET: case Operation::RTE: case Operation::RTR: + case Operation::RTD: case Operation::TRAP: case Operation::TRAPV: case Operation::TRAPcc: + case Operation::BKPT: case Operation::ABCD: case Operation::SBCD: case Operation::NBCD: case Operation::ADDb: case Operation::ADDXb: case Operation::SUBb: case Operation::SUBXb: case Operation::MOVEb: + case Operation::MOVESb: + case Operation::MOVEfromCCR: case Operation::ORItoCCR: case Operation::ANDItoCCR: case Operation::EORItoCCR: @@ -54,12 +58,13 @@ constexpr DataSize operand_size(Operation r_operation) { case Operation::ADDXw: case Operation::SUBw: case Operation::SUBAw: case Operation::SUBXw: case Operation::MOVEw: case Operation::MOVEAw: + case Operation::MOVESw: case Operation::ORItoSR: case Operation::ANDItoSR: case Operation::EORItoSR: case Operation::MOVEtoSR: case Operation::MOVEfromSR: - case Operation::MOVEtoCCR: + case Operation::MOVEtoCCR: // TODO: is this true? case Operation::CMPw: case Operation::CMPAw: case Operation::TSTw: case Operation::DBcc: @@ -92,10 +97,13 @@ constexpr DataSize operand_size(Operation r_operation) { case Operation::ADDXl: case Operation::SUBl: case Operation::SUBAl: case Operation::SUBXl: case Operation::MOVEl: case Operation::MOVEAl: + case Operation::MOVESl: case Operation::LEA: case Operation::PEA: case Operation::EXG: case Operation::SWAP: case Operation::MOVEtoUSP: case Operation::MOVEfromUSP: + case Operation::MOVEtoC: + case Operation::MOVEfromC: case Operation::CMPl: case Operation::CMPAl: case Operation::TSTl: case Operation::JMP: case Operation::JSR: