diff --git a/InstructionSets/x86/Decoder.cpp b/InstructionSets/x86/Decoder.cpp index 533755359..ba3379750 100644 --- a/InstructionSets/x86/Decoder.cpp +++ b/InstructionSets/x86/Decoder.cpp @@ -390,8 +390,6 @@ std::pair::InstructionT> Decoder::decode(con case 0xd0: case 0xd1: ShiftGroup(); - source_ = Source::Immediate; - operand_ = 1; break; case 0xd2: case 0xd3: ShiftGroup(); diff --git a/InstructionSets/x86/Instruction.hpp b/InstructionSets/x86/Instruction.hpp index 716a952d3..6677c523d 100644 --- a/InstructionSets/x86/Instruction.hpp +++ b/InstructionSets/x86/Instruction.hpp @@ -162,19 +162,27 @@ enum class Operation: uint8_t { PUSH, /// PUSH the flags register to the stack. PUSHF, + /// Rotate the destination left through carry the number of bits indicated by source; if the source is a register then implicitly its size is 1. + /// If it is ::None then the rotation is by a single position only. RCL, /// Rotate the destination right through carry the number of bits indicated by source; if the source is a register then implicitly its size is 1. + /// If it is ::None then the rotation is by a single position only. RCR, /// Rotate the destination left the number of bits indicated by source; if the source is a register then implicitly its size is 1. + /// If it is ::None then the rotation is by a single position only. ROL, /// Rotate the destination right the number of bits indicated by source; if the source is a register then implicitly its size is 1. + /// If it is ::None then the rotation is by a single position only. ROR, /// Arithmetic shift left the destination by the number of bits indicated by source; if the source is a register then implicitly its size is 1. + /// If it is ::None then the shift is by a single position only. SAL, /// Arithmetic shift right the destination by the number of bits indicated by source; if the source is a register then implicitly its size is 1. + /// If it is ::None then the shift is by a single position only. SAR, /// Logical shift right the destination by the number of bits indicated by source; if the source is a register then implicitly its size is 1. + /// If it is ::None then the shift is by a single position only. SHR, /// Clear carry flag; no source or destination provided. diff --git a/OSBindings/Mac/Clock SignalTests/8088Tests.mm b/OSBindings/Mac/Clock SignalTests/8088Tests.mm index 9dc886ac8..fc7b49ac3 100644 --- a/OSBindings/Mac/Clock SignalTests/8088Tests.mm +++ b/OSBindings/Mac/Clock SignalTests/8088Tests.mm @@ -128,10 +128,10 @@ std::string to_string(InstructionSet::x86::DataPointer pointer, const Instructio - (NSArray *)testFiles { NSString *path = [NSString stringWithUTF8String:TestSuiteHome]; - NSSet *allowList = nil; -// [[NSSet alloc] initWithArray:@[ -// @"DB.json.gz", -// ]]; + NSSet *allowList = nil; /* + [[NSSet alloc] initWithArray:@[ + @"D0.5.json.gz", + ]]; */ // Unofficial opcodes; ignored for now. NSSet *ignoreList = @@ -237,6 +237,7 @@ std::string to_string(InstructionSet::x86::DataPointer pointer, const Instructio } if(operands > 0) { switch(instruction.source().source()) { + case Source::None: break; case Source::eCX: operation += ", cl"; break; case Source::Immediate: // Providing an immediate operand of 1 is a little future-proofing by the decoder; the '1' @@ -331,8 +332,8 @@ std::string to_string(InstructionSet::x86::DataPointer pointer, const Instructio // Known existing failures versus the provided 8088 disassemblies: // - // * quite a lot of instances similar to jmp word ss:[bp+si+1DEAh] being decoded as jmp word ss:[bp+di+1DEAh] - // for ff a3 ea 1d; I don't currently know why SI is used rather than DI; + // * quite a lot of instances similar to [bp+si+1DEAh] being decoded as [bp+di+1DEAh]; there is an error in the + // test set where si will appear where di should, which obscures potential problems here; // * shifts that have been given a literal source of '1' shouldn't print it; that's a figment ofd this encoding; // * similarly, shifts should print cl as a source rather than cx even when shifting a word; // * ... and in/out should always use an 8-bit source;