diff --git a/src/crab/arm/multiply.cr b/src/crab/arm/multiply.cr index 724f3eb..dc40b38 100644 --- a/src/crab/arm/multiply.cr +++ b/src/crab/arm/multiply.cr @@ -7,8 +7,7 @@ module ARM rs = bits(instr, 8..11) rm = bits(instr, 0..3) - set_reg(rd, @r[rm] &* @r[rs]) - set_reg(rd, @r[rd] &+ @r[rn]) if accumulate + set_reg(rd, @r[rm] &* @r[rs] &+ (accumulate ? @r[rn] : 0)) set_neg_and_zero_flags(@r[rd]) if set_conditions end end