mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-19 23:32:28 +00:00
Fix IN and OUT conversion.
This commit is contained in:
parent
cc9e8117ab
commit
239ce75db6
@ -323,6 +323,13 @@ std::string to_hex(int value, int digits, bool with_suffix = true) {
|
|||||||
return stream.str();
|
return stream.str();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename IntT>
|
||||||
|
std::string to_hex(IntT value) {
|
||||||
|
auto stream = std::stringstream();
|
||||||
|
stream << std::uppercase << std::hex << +value << 'h';
|
||||||
|
return stream.str();
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <bool is_32bit>
|
template <bool is_32bit>
|
||||||
@ -532,7 +539,7 @@ std::string InstructionSet::x86::to_string(
|
|||||||
operation += ", ";
|
operation += ", ";
|
||||||
switch(instruction.source().source()) {
|
switch(instruction.source().source()) {
|
||||||
case Source::DirectAddress:
|
case Source::DirectAddress:
|
||||||
operation += to_hex(instruction.offset(), 2, true);
|
operation += to_hex(uint8_t(instruction.offset()));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
operation += to_string(instruction.source(), instruction, offset_length, immediate_length, InstructionSet::x86::DataSize::Word);
|
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:
|
case Operation::OUT:
|
||||||
switch(instruction.destination().source()) {
|
switch(instruction.destination().source()) {
|
||||||
case Source::DirectAddress:
|
case Source::DirectAddress:
|
||||||
operation += to_hex(instruction.offset(), 2, true);
|
operation += to_hex(uint8_t(instruction.offset()));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
operation += to_string(instruction.destination(), instruction, offset_length, immediate_length, InstructionSet::x86::DataSize::Word);
|
operation += to_string(instruction.destination(), instruction, offset_length, immediate_length, InstructionSet::x86::DataSize::Word);
|
||||||
|
@ -354,10 +354,6 @@ struct FailedExecution {
|
|||||||
@"E1.json.gz",
|
@"E1.json.gz",
|
||||||
@"E2.json.gz",
|
@"E2.json.gz",
|
||||||
@"E3.json.gz",
|
@"E3.json.gz",
|
||||||
@"E4.json.gz",
|
|
||||||
@"E5.json.gz",
|
|
||||||
@"E6.json.gz",
|
|
||||||
@"E7.json.gz",
|
|
||||||
@"E8.json.gz",
|
@"E8.json.gz",
|
||||||
@"E9.json.gz",
|
@"E9.json.gz",
|
||||||
@"EB.json.gz",
|
@"EB.json.gz",
|
||||||
|
Loading…
Reference in New Issue
Block a user