mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-07 08:28:57 +00:00
Add an ignore list.
Leaves 180 failures amongst the valid 306 instructions.
This commit is contained in:
parent
787e9e770e
commit
5fd98e9833
@ -902,6 +902,9 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(con
|
|||||||
if(bytes_to_consume == outstanding_bytes) {
|
if(bytes_to_consume == outstanding_bytes) {
|
||||||
phase_ = Phase::ReadyToPost;
|
phase_ = Phase::ReadyToPost;
|
||||||
|
|
||||||
|
// TODO: whether the displacement is signed appears to depend on the opcode.
|
||||||
|
// Find an appropriate table.
|
||||||
|
|
||||||
switch(displacement_size_) {
|
switch(displacement_size_) {
|
||||||
case DataSize::None: displacement_ = 0; break;
|
case DataSize::None: displacement_ = 0; break;
|
||||||
case DataSize::Byte: displacement_ = int8_t(inward_data_); break;
|
case DataSize::Byte: displacement_ = int8_t(inward_data_); break;
|
||||||
|
@ -365,12 +365,13 @@ constexpr int num_operands(Operation operation) {
|
|||||||
|
|
||||||
case Operation::INC: case Operation::DEC:
|
case Operation::INC: case Operation::DEC:
|
||||||
case Operation::POP: case Operation::PUSH:
|
case Operation::POP: case Operation::PUSH:
|
||||||
case Operation::MUL:
|
case Operation::MUL: case Operation::IMUL_1:
|
||||||
case Operation::IDIV:
|
case Operation::IDIV: case Operation::DIV:
|
||||||
case Operation::RETfar:
|
case Operation::RETfar:
|
||||||
case Operation::ESC:
|
case Operation::ESC:
|
||||||
case Operation::AAM: case Operation::AAD:
|
case Operation::AAM: case Operation::AAD:
|
||||||
case Operation::INT:
|
case Operation::INT:
|
||||||
|
case Operation::JMPabs: case Operation::JMPfar:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// Pedantically, these have an displacement rather than an operand.
|
// Pedantically, these have an displacement rather than an operand.
|
||||||
|
@ -37,13 +37,33 @@ constexpr char TestSuiteHome[] = "/Users/tharte/Projects/ProcessorTests/8088/v1"
|
|||||||
NSSet *allowList = nil;
|
NSSet *allowList = nil;
|
||||||
// [[NSSet alloc] initWithArray:@[
|
// [[NSSet alloc] initWithArray:@[
|
||||||
// @"00.json.gz",
|
// @"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];
|
NSArray<NSString *> *files = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
|
||||||
files = [files filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSString* evaluatedObject, NSDictionary<NSString *,id> *) {
|
files = [files filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSString* evaluatedObject, NSDictionary<NSString *,id> *) {
|
||||||
if(allowList && ![allowList containsObject:[evaluatedObject lastPathComponent]]) {
|
if(allowList && ![allowList containsObject:[evaluatedObject lastPathComponent]]) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
if([ignoreList containsObject:[evaluatedObject lastPathComponent]]) {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
return [evaluatedObject hasSuffix:@"json.gz"];
|
return [evaluatedObject hasSuffix:@"json.gz"];
|
||||||
}]];
|
}]];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user