1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Add test synonym, fix operand size.

19 failures.
This commit is contained in:
Thomas Harte 2023-09-28 09:43:26 -04:00
parent 95df9bcb1e
commit ff4d79e77e
2 changed files with 12 additions and 7 deletions

View File

@ -1,4 +1,5 @@
//
//
// x86.cpp
// Clock Signal
//
@ -703,12 +704,17 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(con
source_ = memreg;
switch(reg) {
default: undefined();
default:
// case 1 is treated as another form of TEST on the 8086.
if constexpr (model >= Model::i80286) {
undefined();
}
[[fallthrough]];
case 0:
destination_ = memreg;
source_ = Source::Immediate;
operand_size_ = data_size_;
operand_size_ = operation_size_;
SetOperation(Operation::TEST);
break;
case 2: SetOperation(Operation::NOT); break;

View File

@ -137,10 +137,9 @@ std::string to_string(InstructionSet::x86::DataPointer pointer, const Instructio
- (NSArray<NSString *> *)testFiles {
NSString *path = [NSString stringWithUTF8String:TestSuiteHome];
NSSet *allowList = nil;
// [NSSet setWithObject:
// @"D2.4.json.gz"
// ];
NSSet *allowList = [NSSet setWithArray:@[
// @"F6.0.json.gz",
]];
// Unofficial opcodes; ignored for now.
NSSet *ignoreList =
@ -166,7 +165,7 @@ std::string to_string(InstructionSet::x86::DataPointer pointer, const Instructio
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]]) {
if(allowList.count && ![allowList containsObject:[evaluatedObject lastPathComponent]]) {
return NO;
}
if([ignoreList containsObject:[evaluatedObject lastPathComponent]]) {