From dced540aa57e838fd05b31acca50aaa5584b61b9 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Sat, 29 Apr 2023 15:29:32 +0000 Subject: [PATCH] Result needs rounding so add +1 to prod* --- openpower/isa/butterfly.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpower/isa/butterfly.mdwn b/openpower/isa/butterfly.mdwn index 555e8abd..94840b03 100644 --- a/openpower/isa/butterfly.mdwn +++ b/openpower/isa/butterfly.mdwn @@ -13,8 +13,8 @@ Pseudo-code: n <- SH sum <- (RT) + (RA) diff <- (RT) - (RA) - prod1 <- MULS(RB, sum)[XLEN:(XLEN*2)-1] - prod2 <- MULS(RB, diff)[XLEN:(XLEN*2)-1] + prod1 <- MULS(RB, sum)[XLEN:(XLEN*2)-1] + 1 + prod2 <- MULS(RB, diff)[XLEN:(XLEN*2)-1] + 1 res1 <- ROTL64(prod1, XLEN-n) res2 <- ROTL64(prod2, XLEN-n) m <- MASK(n, (XLEN-1)) -- 2.30.2