From 03caa5386326b83313941e6507ed2eff1a22f89d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 24 Apr 2022 19:58:10 -0400 Subject: [PATCH] Translate BSET. --- InstructionSets/68k/Decoder.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/InstructionSets/68k/Decoder.cpp b/InstructionSets/68k/Decoder.cpp index 040a32730..c539b275d 100644 --- a/InstructionSets/68k/Decoder.cpp +++ b/InstructionSets/68k/Decoder.cpp @@ -246,13 +246,15 @@ template uint32_t Predecoder::invalid_operands() { Quick >::value; - case OpT(Operation::BCHG): case OpT(Operation::BCLR): + case OpT(Operation::BCHG): + case OpT(Operation::BCLR): + case OpT(Operation::BSET): return ~TwoOperandMask< Dn, AlterableAddressingModesNoAn >::value; - case BCHGI: case BCLRI: + case BCHGI: case BCLRI: case BSETI: return ~TwoOperandMask< Imm, AlterableAddressingModesNoAn @@ -294,6 +296,7 @@ template Preinstruction Predecoder::validated case OpT(Operation::Bccb): case OpT(Operation::Bccw): case OpT(Operation::Bccl): case OpT(Operation::BCHG): case BCHGI: case OpT(Operation::BCLR): case BCLRI: + case OpT(Operation::BSET): case BSETI: case OpT(Operation::NBCD): { const auto invalid = invalid_operands(); const auto observed = operand_mask(original); @@ -477,8 +480,6 @@ template Preinstruction Predecoder::validated return Preinstruction(); } - // ADDA, SUBA. -// case OpT(Operation::ADDAw): case OpT(Operation::ADDAl): case OpT(Operation::SUBAw): case OpT(Operation::SUBAl): switch(original.mode<0>()) { default: break; @@ -519,18 +520,6 @@ template Preinstruction Predecoder::validated return Preinstruction(); } - case OpT(Operation::BSET): case BSETI: - switch(original.mode<1>()) { - default: return original; - - case AddressingMode::None: - case AddressingMode::AddressRegisterDirect: - case AddressingMode::ProgramCounterIndirectWithDisplacement: - case AddressingMode::ProgramCounterIndirectWithIndex8bitDisplacement: - case AddressingMode::ImmediateData: - return Preinstruction(); - } - case BTSTI: switch(original.mode<1>()) { default: return original;