1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00

Add an ignore list.

Leaves 180 failures amongst the valid 306 instructions.
This commit is contained in:
Thomas Harte 2023-09-22 22:56:33 -04:00
parent 787e9e770e
commit 5fd98e9833
3 changed files with 27 additions and 3 deletions

View File

@ -902,6 +902,9 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(con
if(bytes_to_consume == outstanding_bytes) {
phase_ = Phase::ReadyToPost;
// TODO: whether the displacement is signed appears to depend on the opcode.
// Find an appropriate table.
switch(displacement_size_) {
case DataSize::None: displacement_ = 0; break;
case DataSize::Byte: displacement_ = int8_t(inward_data_); break;

View File

@ -365,12 +365,13 @@ constexpr int num_operands(Operation operation) {
case Operation::INC: case Operation::DEC:
case Operation::POP: case Operation::PUSH:
case Operation::MUL:
case Operation::IDIV:
case Operation::MUL: case Operation::IMUL_1:
case Operation::IDIV: case Operation::DIV:
case Operation::RETfar:
case Operation::ESC:
case Operation::AAM: case Operation::AAD:
case Operation::INT:
case Operation::JMPabs: case Operation::JMPfar:
return 1;
// Pedantically, these have an displacement rather than an operand.

View File

@ -37,13 +37,33 @@ constexpr char TestSuiteHome[] = "/Users/tharte/Projects/ProcessorTests/8088/v1"
NSSet *allowList = nil;
// [[NSSet alloc] initWithArray:@[
// @"00.json.gz",
// ]];∂
// ]];
// Unofficial opcodes; ignored for now.
NSSet *ignoreList =
[[NSSet alloc] initWithArray:@[
@"60.json.gz", @"61.json.gz", @"62.json.gz", @"63.json.gz",
@"64.json.gz", @"65.json.gz", @"66.json.gz", @"67.json.gz",
@"68.json.gz", @"69.json.gz", @"6a.json.gz", @"6b.json.gz",
@"6c.json.gz", @"6d.json.gz", @"6e.json.gz", @"6f.json.gz",
@"82.0.json.gz", @"82.1.json.gz", @"82.2.json.gz", @"82.3.json.gz",
@"82.4.json.gz", @"82.5.json.gz", @"82.6.json.gz", @"82.7.json.gz",
@"c0.json.gz", @"c1.json.gz", @"c8.json.gz", @"c9.json.gz",
@"f6.1.json.gz", @"f7.1.json.gz",
@"ff.7.json.gz",
]];
NSArray<NSString *> *files = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
files = [files filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSString* evaluatedObject, NSDictionary<NSString *,id> *) {
if(allowList && ![allowList containsObject:[evaluatedObject lastPathComponent]]) {
return NO;
}
if([ignoreList containsObject:[evaluatedObject lastPathComponent]]) {
return NO;
}
return [evaluatedObject hasSuffix:@"json.gz"];
}]];