From 17666bc059c1f7e1d1762aaba78083e372806061 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 28 Jun 2019 19:48:53 -0400 Subject: [PATCH] Corrects CHK flags. --- Processors/68000/Implementation/68000Implementation.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index 5a11c3e63..436c2970c 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -1303,11 +1303,13 @@ template void Proces const bool is_under = s_extend16(active_program_->destination->halves.low.full) < 0; const bool is_over = s_extend16(active_program_->destination->halves.low.full) > s_extend16(active_program_->source->halves.low.full); + overflow_flag_ = carry_flag_ = 0; + zero_result_ = active_program_->destination->halves.low.full; + negative_flag_ = (is_under && !is_over) ? 1 : 0; + // No exception is the default course of action; deviate only if an // exception is necessary. if(is_under || is_over) { - negative_flag_ = is_under ? 1 : 0; - bus_program = trap_steps_; populate_trap_steps(6, get_status()); if(is_under) {