From 0857dd0ae58e3d1da07c8bc55d0410fd2c7f2561 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 1 Jun 2022 14:05:23 -0400 Subject: [PATCH] Include fixed base cost in MULU and MULS. --- Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp index 5e67d9417..04d589295 100644 --- a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp +++ b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp @@ -2635,7 +2635,7 @@ template void ProcessorBase::did_divs(int32_t dividend, int3 template void ProcessorBase::did_mulu(IntT multiplier) { // Count number of bits set. convert_to_bit_count_16(multiplier); - dynamic_instruction_length_ = multiplier; + dynamic_instruction_length_ = 17 + multiplier; } template void ProcessorBase::did_muls(IntT multiplier) { @@ -2644,7 +2644,7 @@ template void ProcessorBase::did_muls(IntT multiplier) { // Treat the bit to the right of b0 as 0. int number_of_pairs = (multiplier ^ (multiplier << 1)) & 0xffff; convert_to_bit_count_16(number_of_pairs); - dynamic_instruction_length_ = number_of_pairs; + dynamic_instruction_length_ = 17 + number_of_pairs; } #undef convert_to_bit_count_16