mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-09 00:37:27 +00:00
Add outputters for IN and OUT.
2 failures remaining.
This commit is contained in:
parent
b76899f2bc
commit
1a6c8a2aed
@ -141,6 +141,7 @@ std::string InstructionSet::x86::to_string(Operation operation, DataSize size) {
|
||||
|
||||
default:
|
||||
assert(false);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ enum class Operation: uint8_t {
|
||||
|
||||
/// Reads from the port specified by source to the destination.
|
||||
IN,
|
||||
/// Writes from the port specified by destination from the source.
|
||||
/// Writes to the port specified by destination from the source.
|
||||
OUT,
|
||||
|
||||
// Various jumps; see the displacement to calculate targets.
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
423BDC4A2AB24699008E37B6 /* 8088Tests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 423BDC492AB24699008E37B6 /* 8088Tests.mm */; };
|
||||
42437B332AC70833006DFED1 /* HDV.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6FD0342923061300EC4760 /* HDV.cpp */; };
|
||||
4281683A2A37AFB4008ECD27 /* DispatcherTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 428168392A37AFB4008ECD27 /* DispatcherTests.mm */; };
|
||||
42A5E80C2ABBE04600A0DD5D /* NeskellTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42A5E80B2ABBE04600A0DD5D /* NeskellTests.swift */; };
|
||||
42A5E8442ABBE16F00A0DD5D /* illegal_rmw_test.bin in Resources */ = {isa = PBXBuildFile; fileRef = 42A5E8332ABBE16F00A0DD5D /* illegal_rmw_test.bin */; };
|
||||
@ -6329,6 +6330,7 @@
|
||||
4B778F4323A5F1B00000D260 /* ImplicitSectors.cpp in Sources */,
|
||||
4B7752B128217EA30073E2C5 /* StaticAnalyser.cpp in Sources */,
|
||||
4B778F5123A5F2290000D260 /* StaticAnalyser.cpp in Sources */,
|
||||
42437B332AC70833006DFED1 /* HDV.cpp in Sources */,
|
||||
4B7752C028217F3D0073E2C5 /* Line.cpp in Sources */,
|
||||
4B7C7A00282C3BCA002D6C0B /* 68000flamewingTests.mm in Sources */,
|
||||
4B778F0223A5EBA40000D260 /* MFMSectorDump.cpp in Sources */,
|
||||
|
@ -146,7 +146,9 @@ std::string to_string(
|
||||
- (NSArray<NSString *> *)testFiles {
|
||||
NSString *path = [NSString stringWithUTF8String:TestSuiteHome];
|
||||
NSSet *allowList = [NSSet setWithArray:@[
|
||||
// @"F6.7.json.gz",
|
||||
// Failing CALL and JMP.
|
||||
// @"FF.3.json.gz",
|
||||
// @"FF.5.json.gz",
|
||||
]];
|
||||
|
||||
// Unofficial opcodes; ignored for now.
|
||||
@ -250,6 +252,34 @@ std::string to_string(
|
||||
operation += to_string(instruction.source(), instruction, offsetLength, immediateLength, InstructionSet::x86::DataSize::DWord);
|
||||
break;
|
||||
|
||||
case Operation::IN:
|
||||
operation += " ";
|
||||
operation += to_string(instruction.destination(), instruction, offsetLength, immediateLength);
|
||||
operation += ", ";
|
||||
switch(instruction.source().source()) {
|
||||
case Source::DirectAddress:
|
||||
operation += to_hex(instruction.offset(), 2, true);
|
||||
break;
|
||||
default:
|
||||
operation += to_string(instruction.source(), instruction, offsetLength, immediateLength, InstructionSet::x86::DataSize::Word);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case Operation::OUT:
|
||||
operation += " ";
|
||||
switch(instruction.destination().source()) {
|
||||
case Source::DirectAddress:
|
||||
operation += to_hex(instruction.offset(), 2, true);
|
||||
break;
|
||||
default:
|
||||
operation += to_string(instruction.destination(), instruction, offsetLength, immediateLength, InstructionSet::x86::DataSize::Word);
|
||||
break;
|
||||
}
|
||||
operation += ", ";
|
||||
operation += to_string(instruction.source(), instruction, offsetLength, immediateLength);
|
||||
break;
|
||||
|
||||
// Rolls and shifts list eCX as a source on the understanding that everyone knows that rolls and shifts
|
||||
// use CL even when they're shifting or rolling a word-sized quantity.
|
||||
case Operation::RCL: case Operation::RCR:
|
||||
|
Loading…
x
Reference in New Issue
Block a user