diff --git a/InstructionSets/68k/Decoder.cpp b/InstructionSets/68k/Decoder.cpp index bffdc8e16..241c68e82 100644 --- a/InstructionSets/68k/Decoder.cpp +++ b/InstructionSets/68k/Decoder.cpp @@ -343,6 +343,12 @@ template uint32_t Predecoder::invalid_operands() { return ~OneOperandMask< Dn >::value; + + case OpT(Operation::JMP): + case OpT(Operation::JSR): + return ~OneOperandMask< + Ind | d16An | d8AnXn | XXXw | XXXl | d16PC | d8PCXn + >::value; } } @@ -391,6 +397,8 @@ template Preinstruction Predecoder::validated case OpT(Operation::EORItoCCR): case EXGRtoR: case EXGAtoA: case EXGRtoA: case OpT(Operation::EXTbtow): case OpT(Operation::EXTwtol): + case OpT(Operation::JMP): + case OpT(Operation::JSR): case OpT(Operation::NBCD): { const auto invalid = invalid_operands(); const auto observed = operand_mask(original); @@ -505,7 +513,6 @@ template Preinstruction Predecoder::validated return Preinstruction(); } - /*case ADDtoMb: case ADDtoMw: case ADDtoMl:*/ case SUBtoMb: case SUBtoMw: case SUBtoMl: { // TODO: I'm going to need get-size-by-operation elsewhere; use that here when implemented. constexpr bool is_byte = op == ADDtoMb || op == SUBtoMb; @@ -611,19 +618,6 @@ template Preinstruction Predecoder::validated return Preinstruction(); } - case OpT(Operation::JSR): case OpT(Operation::JMP): - switch(original.mode<0>()) { - default: return original; - - case AddressingMode::DataRegisterDirect: - case AddressingMode::AddressRegisterDirect: - case AddressingMode::AddressRegisterIndirectWithPostincrement: - case AddressingMode::AddressRegisterIndirectWithPredecrement: - case AddressingMode::ImmediateData: - case AddressingMode::None: - return Preinstruction(); - } - case OpT(Operation::Scc): case OpT(Operation::NEGXb): case OpT(Operation::NEGXw): case OpT(Operation::NEGXl): case OpT(Operation::NEGb): case OpT(Operation::NEGw): case OpT(Operation::NEGl):