diff --git a/InstructionSets/68k/Decoder.cpp b/InstructionSets/68k/Decoder.cpp index bf4f1c904..e054a1efd 100644 --- a/InstructionSets/68k/Decoder.cpp +++ b/InstructionSets/68k/Decoder.cpp @@ -141,7 +141,7 @@ template Preinstruction Predecoder::validated return Preinstruction(); } - // ADD. + // ADD, SUB, MOVE, MOVEA case OpT(Operation::ADDb): case OpT(Operation::ADDw): case OpT(Operation::ADDl): case OpT(Operation::SUBb): case OpT(Operation::SUBw): case OpT(Operation::SUBl): case OpT(Operation::MOVEb): case OpT(Operation::MOVEw): case OpT(Operation::MOVEl): @@ -173,7 +173,7 @@ template Preinstruction Predecoder::validated return Preinstruction(); } - // ADDA. + // ADDA, SUBA. case OpT(Operation::ADDAw): case OpT(Operation::ADDAl): case OpT(Operation::SUBAw): case OpT(Operation::SUBAl): switch(original.mode<0>()) { @@ -192,20 +192,17 @@ template Preinstruction Predecoder::validated return Preinstruction(); } - // MOVE. + // LEA + case OpT(Operation::LEA): switch(original.mode<0>()) { - default: break; - case AddressingMode::None: - return Preinstruction(); - } - - switch(original.mode<1>()) { default: return original; - case AddressingMode::ImmediateData: - case AddressingMode::ProgramCounterIndirectWithDisplacement: - case AddressingMode::ProgramCounterIndirectWithIndex8bitDisplacement: case AddressingMode::None: + case AddressingMode::DataRegisterDirect: + case AddressingMode::AddressRegisterDirect: + case AddressingMode::AddressRegisterIndirectWithPostincrement: + case AddressingMode::AddressRegisterIndirectWithPredecrement: + case AddressingMode::ImmediateData: return Preinstruction(); } } diff --git a/OSBindings/Mac/Clock SignalTests/m68kDecoderTests.mm b/OSBindings/Mac/Clock SignalTests/m68kDecoderTests.mm index a4c87055d..d40839512 100644 --- a/OSBindings/Mac/Clock SignalTests/m68kDecoderTests.mm +++ b/OSBindings/Mac/Clock SignalTests/m68kDecoderTests.mm @@ -119,6 +119,11 @@ template NSString *operand(Preinstruction instruction) { case Operation::MOVEAw: instruction = @"MOVEA.w"; break; case Operation::MOVEAl: instruction = @"MOVEA.l"; break; + case Operation::MOVEq: instruction = @"MOVEq"; break; + + case Operation::LEA: instruction = @"LEA"; break; + case Operation::PEA: instruction = @"PEA"; break; + // For now, skip any unmapped operations. default: continue; }