From 2f2d6bc08b448b7596aa1c9275ad4b029e0c9281 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 3 May 2022 09:05:34 -0400 Subject: [PATCH] Correct CMPw. --- InstructionSets/M68k/Implementation/PerformImplementation.hpp | 2 +- OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/InstructionSets/M68k/Implementation/PerformImplementation.hpp b/InstructionSets/M68k/Implementation/PerformImplementation.hpp index a51e2d2a0..e2fc7fcff 100644 --- a/InstructionSets/M68k/Implementation/PerformImplementation.hpp +++ b/InstructionSets/M68k/Implementation/PerformImplementation.hpp @@ -350,7 +350,7 @@ template < case Operation::CMPw: { const uint16_t source = src.w; - const uint16_t destination = src.w; + const uint16_t destination = dest.w; const int result = destination - source; status.zero_result_ = result & 0xffff; diff --git a/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm b/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm index f96c29449..6974b9cda 100644 --- a/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm +++ b/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm @@ -28,7 +28,8 @@ - (void)setUp { // To limit tests run to a subset of files and/or of tests, uncomment and fill in below. - _fileSet = [NSSet setWithArray:@[@"add_sub.json"]]; + _fileSet = [NSSet setWithArray:@[@"eor_and_or.json"]]; +// _testSet = [NSSet setWithArray:@[@"OR 8103"]]; // _fileSet = [NSSet setWithArray:@[@"jmp_jsr.json"]]; // _testSet = [NSSet setWithArray:@[@"CHK 41a8"]]; }