From 98cb9cc1ebd4dc17ff3f58cebc146eca3e3ef5f0 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 7 May 2022 21:16:44 -0400 Subject: [PATCH] Fix CHK operand size. --- InstructionSets/M68k/Instruction.hpp | 2 +- .../68000ComparativeTests.mm | 57 +------------------ 2 files changed, 3 insertions(+), 56 deletions(-) diff --git a/InstructionSets/M68k/Instruction.hpp b/InstructionSets/M68k/Instruction.hpp index bb81ab0fd..9483ff9f5 100644 --- a/InstructionSets/M68k/Instruction.hpp +++ b/InstructionSets/M68k/Instruction.hpp @@ -166,7 +166,6 @@ constexpr DataSize operand_size(Operation operation) { case Operation::ROXLb: case Operation::ROXRb: case Operation::ANDb: case Operation::EORb: case Operation::NOTb: case Operation::ORb: - case Operation::CHK: case Operation::TAS: return DataSize::Byte; @@ -205,6 +204,7 @@ constexpr DataSize operand_size(Operation operation) { case Operation::MULU: case Operation::MULS: case Operation::EXTbtow: case Operation::LINKw: + case Operation::CHK: return DataSize::Word; case Operation::ADDl: case Operation::ADDAl: diff --git a/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm b/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm index 9faf3c5b6..b15506724 100644 --- a/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm +++ b/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm @@ -28,63 +28,10 @@ NSMutableArray *_failingOpcodes; } -// New implementation verified against (i.e. has the same failures as the old, likely all BCD related): -// -// add_sub -// addi_subi_cmpi -// eor_and_or -// addq_subq -// addx_subx -// bcc -// cmp -// dbcc_scc -// eori_andi_ori -// lea -// lslr_aslr_roxlr_rolr -// move_tofrom_srccr -// move -// movem -// movep -// moveq -// mulu_muls -// neg_not -// negx_clr -// swap -// tas -// tst -// rts -// rtr - -// Issues to fix: -// -// LINK A7, in which the post-operation writeback overwrites -// the modified value. -// -// Do I need a dedicated LINKA7 operation? -// -// This affects link_unlk - -// Skipped for now, for implying a more granular decoder: -// -// btst_bchg_bclr_bset -// chk -// -// And for uncertainty around the test result status register correctness: -// -// divu_divs -// eor_and_or (which invokes BCD) -// exg (also BCD) -// chk -// nbcd_pea (BCD) -// -// And because possibly my old CHK is pushing the wrong program counter? -// -// ext.json - - (void)setUp { // To limit tests run to a subset of files and/or of tests, uncomment and fill in below. - _fileSet = [NSSet setWithArray:@[@"ext.json"]]; -// _testSet = [NSSet setWithArray:@[@"NEGX 00c0"]]; +// _fileSet = [NSSet setWithArray:@[@"chk.json"]]; +// _testSet = [NSSet setWithArray:@[@"CHK 4190"]]; // _fileSet = [NSSet setWithArray:@[@"jmp_jsr.json"]]; // _testSet = [NSSet setWithArray:@[@"CHK 41a8"]]; }