From e4c6251ef5906c555ff52fee28b25bc3bca61c53 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 18 Apr 2022 14:42:31 -0400 Subject: [PATCH] Express the BSR/Bcc.l test properly. --- InstructionSets/68k/Decoder.cpp | 8 ++++++-- InstructionSets/68k/Model.hpp | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/InstructionSets/68k/Decoder.cpp b/InstructionSets/68k/Decoder.cpp index 14d129710..b540754ac 100644 --- a/InstructionSets/68k/Decoder.cpp +++ b/InstructionSets/68k/Decoder.cpp @@ -728,7 +728,7 @@ Preinstruction Predecoder::decode6(uint16_t instruction) { switch(instruction & 0xff) { case 0x00: Decode(Op::BSRw); case 0xff: - if constexpr (model != Model::M68000) { + if constexpr (model >= Model::M68020) { Decode(Op::BSRl); } [[fallthrough]]; @@ -741,7 +741,7 @@ Preinstruction Predecoder::decode6(uint16_t instruction) { switch(instruction & 0xff) { case 0x00: Decode(Op::Bccw); case 0xff: - if constexpr (model != Model::M68000) { + if constexpr (model >= Model::M68020) { Decode(Op::Bccl); } [[fallthrough]]; @@ -1016,3 +1016,7 @@ Preinstruction Predecoder::decode(uint16_t instruction) { } template class InstructionSet::M68k::Predecoder; +template class InstructionSet::M68k::Predecoder; +template class InstructionSet::M68k::Predecoder; +template class InstructionSet::M68k::Predecoder; +template class InstructionSet::M68k::Predecoder; diff --git a/InstructionSets/68k/Model.hpp b/InstructionSets/68k/Model.hpp index a20ec15fd..3de18d405 100644 --- a/InstructionSets/68k/Model.hpp +++ b/InstructionSets/68k/Model.hpp @@ -14,6 +14,10 @@ namespace M68k { enum class Model { M68000, + M68010, + M68020, + M68030, + M68040, }; }