From: Konstantinos Margaritis Date: Sat, 29 Apr 2023 15:29:32 +0000 (+0000) Subject: Result needs rounding so add +1 to prod* X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=102dda243180cc0a0ccfe5ed9e5ced2b775f7232;p=openpower-isa.git Result needs rounding so add +1 to prod* --- 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))