mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-14 13:33:42 +00:00
Don't offer repne for reps; print far CALLs and JMPs as h-suffix rather than 0x prefix.
This commit is contained in:
parent
20d7079006
commit
0e027445d4
@ -437,19 +437,27 @@ std::string InstructionSet::x86::to_string(
|
||||
case Repetition::None: break;
|
||||
case Repetition::RepE:
|
||||
switch(instruction.operation) {
|
||||
default:
|
||||
case Operation::CMPS:
|
||||
case Operation::SCAS:
|
||||
operation += "repe ";
|
||||
break;
|
||||
|
||||
case Operation::MOVS:
|
||||
case Operation::STOS:
|
||||
case Operation::LODS:
|
||||
default:
|
||||
operation += "rep ";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Repetition::RepNE:
|
||||
operation += "repne ";
|
||||
switch(instruction.operation) {
|
||||
case Operation::CMPS:
|
||||
case Operation::SCAS:
|
||||
operation += "repne ";
|
||||
break;
|
||||
|
||||
default:
|
||||
operation += "rep ";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -479,10 +487,10 @@ std::string InstructionSet::x86::to_string(
|
||||
case Operation::JMPfar: {
|
||||
switch(instruction.destination().source()) {
|
||||
case Source::Immediate:
|
||||
operation += "far 0x";
|
||||
operation += to_hex(instruction.segment(), 4, false);
|
||||
operation += ":0x";
|
||||
operation += "h:";
|
||||
operation += to_hex(instruction.offset(), 4, false);
|
||||
operation += "h";
|
||||
break;
|
||||
default:
|
||||
operation += to_string(instruction.destination(), instruction, offset_length, immediate_length);
|
||||
|
@ -350,7 +350,6 @@ struct FailedExecution {
|
||||
@"7D.json.gz",
|
||||
@"7E.json.gz",
|
||||
@"7F.json.gz",
|
||||
@"9A.json.gz",
|
||||
@"A4.json.gz",
|
||||
@"A5.json.gz",
|
||||
@"A6.json.gz",
|
||||
@ -372,7 +371,6 @@ struct FailedExecution {
|
||||
@"E7.json.gz",
|
||||
@"E8.json.gz",
|
||||
@"E9.json.gz",
|
||||
@"EA.json.gz",
|
||||
@"EB.json.gz",
|
||||
|
||||
|
||||
@ -500,11 +498,10 @@ struct FailedExecution {
|
||||
if(assert) {
|
||||
XCTAssert(
|
||||
isEqual,
|
||||
"%@ doesn't match %@ or similar, was %@ within %@",
|
||||
"%@ doesn't match %@ or similar, was %@",
|
||||
test[@"name"],
|
||||
[decodings anyObject],
|
||||
hex_instruction(),
|
||||
file
|
||||
hex_instruction()
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user