From 37edba4da759e8a969bfcd86ca88908ab2c60b38 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 11 Dec 2025 09:01:41 +1100 Subject: [PATCH] FPU: Normalize B operand for multiply-add instructions Otherwise the result can get rounded incorrectly when B is denorm but the A * C product is much smaller. Signed-off-by: Paul Mackerras --- fpu.vhdl | 1 + 1 file changed, 1 insertion(+) diff --git a/fpu.vhdl b/fpu.vhdl index 014f9ee..53027ff 100644 --- a/fpu.vhdl +++ b/fpu.vhdl @@ -1149,6 +1149,7 @@ begin v.is_subtract := not (e_in.fra(63) xor e_in.frb(63) xor e_in.frc(63) xor e_in.insn(1)); v.negate := e_in.insn(2); + v.do_renorm_b := '1'; when "10010" => -- fdiv v.is_inverse := '1'; v.result_sign := e_in.fra(63) xor e_in.frb(63);