diff --git a/InstructionSets/x86/Instruction.cpp b/InstructionSets/x86/Instruction.cpp index 9a039dbc3..008dbfa08 100644 --- a/InstructionSets/x86/Instruction.cpp +++ b/InstructionSets/x86/Instruction.cpp @@ -323,6 +323,13 @@ std::string to_hex(int value, int digits, bool with_suffix = true) { return stream.str(); }; +template +std::string to_hex(IntT value) { + auto stream = std::stringstream(); + stream << std::uppercase << std::hex << +value << 'h'; + return stream.str(); +}; + } template @@ -532,7 +539,7 @@ std::string InstructionSet::x86::to_string( operation += ", "; switch(instruction.source().source()) { case Source::DirectAddress: - operation += to_hex(instruction.offset(), 2, true); + operation += to_hex(uint8_t(instruction.offset())); break; default: operation += to_string(instruction.source(), instruction, offset_length, immediate_length, InstructionSet::x86::DataSize::Word); @@ -543,7 +550,7 @@ std::string InstructionSet::x86::to_string( case Operation::OUT: switch(instruction.destination().source()) { case Source::DirectAddress: - operation += to_hex(instruction.offset(), 2, true); + operation += to_hex(uint8_t(instruction.offset())); break; default: operation += to_string(instruction.destination(), instruction, offset_length, immediate_length, InstructionSet::x86::DataSize::Word); diff --git a/OSBindings/Mac/Clock SignalTests/8088Tests.mm b/OSBindings/Mac/Clock SignalTests/8088Tests.mm index 77a7391ef..e27e8a67b 100644 --- a/OSBindings/Mac/Clock SignalTests/8088Tests.mm +++ b/OSBindings/Mac/Clock SignalTests/8088Tests.mm @@ -354,10 +354,6 @@ struct FailedExecution { @"E1.json.gz", @"E2.json.gz", @"E3.json.gz", - @"E4.json.gz", - @"E5.json.gz", - @"E6.json.gz", - @"E7.json.gz", @"E8.json.gz", @"E9.json.gz", @"EB.json.gz",