From a3fbcc7c16f80dd7801ceacf1d4a22a7bf88e9e1 Mon Sep 17 00:00:00 2001 From: transistor Date: Wed, 14 Sep 2022 21:52:24 -0700 Subject: [PATCH] Fixed some DIV tests --- src/cpus/m68k/execute.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cpus/m68k/execute.rs b/src/cpus/m68k/execute.rs index ced4bb4..a2f62da 100644 --- a/src/cpus/m68k/execute.rs +++ b/src/cpus/m68k/execute.rs @@ -445,10 +445,9 @@ impl M68k { Sign::Unsigned => (existing % value, existing / value), }; - // Only update the register if the quotient was large than a 16-bit number if (quotient & 0xFFFF0000) == 0 { - self.set_compare_flags(quotient as u32, Size::Long, false, (quotient & 0xFFFF0000) != 0); + self.set_compare_flags(quotient as u32, Size::Word, false, false); self.state.d_reg[dest as usize] = (remainder << 16) | (0xFFFF & quotient); } else { self.set_flag(Flags::Carry, true);