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

Deal with all dangling aliases.

Leaves just five undocumented instructions.
This commit is contained in:
Thomas Harte 2023-09-29 15:36:34 -04:00
parent 9fe6e354a6
commit 6cbb434482
2 changed files with 27 additions and 13 deletions

View File

@ -407,11 +407,23 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(con
case 0xbe: RegData(MOV, eSI, data_size_); break;
case 0xbf: RegData(MOV, eDI, data_size_); break;
case 0xc0: case 0xc1:
RequiresMin(i80186);
case 0xc0:
if constexpr (model >= Model::i80186) {
ShiftGroup();
source_ = Source::Immediate;
operand_size_ = DataSize::Byte;
} else {
RegData(RETnear, None, data_size_);
}
break;
case 0xc1:
if constexpr (model >= Model::i80186) {
ShiftGroup();
source_ = Source::Immediate;
operand_size_ = data_size_;
} else {
Complete(RETnear, None, None, DataSize::None);
}
break;
case 0xc2: RegData(RETnear, None, data_size_); break;
case 0xc3: Complete(RETnear, None, None, DataSize::None); break;
@ -421,12 +433,18 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(con
case 0xc7: MemRegReg(MOV, MemRegMOV, data_size_); break;
case 0xc8:
RequiresMin(i80186);
if constexpr (model >= Model::i80186) {
Displacement16Operand8(ENTER);
} else {
RegData(RETfar, None, data_size_);
}
break;
case 0xc9:
RequiresMin(i80186);
if constexpr (model >= Model::i80186) {
Complete(LEAVE, None, None, DataSize::None);
} else {
Complete(RETfar, None, None, DataSize::DWord);
}
break;
case 0xca: RegData(RETfar, None, data_size_); break;

View File

@ -151,10 +151,6 @@ std::string to_string(
// Unofficial opcodes; ignored for now.
NSSet *ignoreList =
[NSSet setWithObjects:
// Aliases.
@"82.0.json.gz", @"82.1.json.gz", @"82.2.json.gz", @"82.3.json.gz",
@"82.4.json.gz", @"82.5.json.gz", @"82.6.json.gz", @"82.7.json.gz",
@"C0.json.gz", @"C1.json.gz", @"C8.json.gz", @"C9.json.gz",
// Undocumented instructions.
@"D0.6.json.gz", @"D1.6.json.gz", @"D2.6.json.gz", @"D3.6.json.gz",