From c3b436fe96e9a494dd2182e3d3b7ab6ae96834d6 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 2 Jun 2022 21:39:52 -0400 Subject: [PATCH] Use `int64_t` as an intermediary to avoid x86 exception on INT_MIN/-1. --- InstructionSets/M68k/Implementation/PerformImplementation.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InstructionSets/M68k/Implementation/PerformImplementation.hpp b/InstructionSets/M68k/Implementation/PerformImplementation.hpp index 91bc447f4..66af70912 100644 --- a/InstructionSets/M68k/Implementation/PerformImplementation.hpp +++ b/InstructionSets/M68k/Implementation/PerformImplementation.hpp @@ -533,7 +533,7 @@ template < return; \ } \ \ - const auto quotient = dividend / divisor; \ + const auto quotient = int64_t(dividend) / int64_t(divisor); \ if(quotient != Type32(Type16(quotient))) { \ status.overflow_flag = 1; \ flow_controller.template flow_function(dividend, divisor); \