1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Add segment prefix for MOVS, LODS, etc.

This commit is contained in:
Thomas Harte 2023-10-24 15:07:53 -04:00
parent 0e027445d4
commit e36274e5c2
2 changed files with 21 additions and 10 deletions

View File

@ -432,6 +432,27 @@ std::string InstructionSet::x86::to_string(
) {
std::string operation;
// Add segment override, if any, ahead of some operations that won't otherwise print it.
switch(instruction.operation) {
default: break;
case Operation::CMPS:
case Operation::SCAS:
case Operation::STOS:
case Operation::LODS:
case Operation::MOVS:
switch(instruction.segment_override()) {
default: break;
case Source::ES: operation += "es "; break;
case Source::CS: operation += "cs "; break;
case Source::DS: operation += "ds "; break;
case Source::SS: operation += "ss "; break;
case Source::GS: operation += "gs "; break;
case Source::FS: operation += "fs "; break;
}
break;
}
// Add a repetition prefix; it'll be one of 'rep', 'repe' or 'repne'.
switch(instruction.repetition()) {
case Repetition::None: break;

View File

@ -350,16 +350,6 @@ struct FailedExecution {
@"7D.json.gz",
@"7E.json.gz",
@"7F.json.gz",
@"A4.json.gz",
@"A5.json.gz",
@"A6.json.gz",
@"A7.json.gz",
@"AA.json.gz",
@"AB.json.gz",
@"AC.json.gz",
@"AD.json.gz",
@"AE.json.gz",
@"AF.json.gz",
@"CC.json.gz",
@"E0.json.gz",
@"E1.json.gz",