1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

Express the BSR/Bcc.l test properly.

This commit is contained in:
Thomas Harte 2022-04-18 14:42:31 -04:00
parent 7aa250eaf7
commit e4c6251ef5
2 changed files with 10 additions and 2 deletions

View File

@ -728,7 +728,7 @@ Preinstruction Predecoder<model>::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<model>::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<model>::decode(uint16_t instruction) {
}
template class InstructionSet::M68k::Predecoder<InstructionSet::M68k::Model::M68000>;
template class InstructionSet::M68k::Predecoder<InstructionSet::M68k::Model::M68010>;
template class InstructionSet::M68k::Predecoder<InstructionSet::M68k::Model::M68020>;
template class InstructionSet::M68k::Predecoder<InstructionSet::M68k::Model::M68030>;
template class InstructionSet::M68k::Predecoder<InstructionSet::M68k::Model::M68040>;

View File

@ -14,6 +14,10 @@ namespace M68k {
enum class Model {
M68000,
M68010,
M68020,
M68030,
M68040,
};
}