From f3cf65caf04bc7227da8e87d11b033eb58bc7437 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Mon, 1 May 2023 18:05:10 +0000 Subject: [PATCH] use a simpler way to do the same thing --- openpower/isa/butterfly.mdwn | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openpower/isa/butterfly.mdwn b/openpower/isa/butterfly.mdwn index 65f4dc56..43c5c48f 100644 --- a/openpower/isa/butterfly.mdwn +++ b/openpower/isa/butterfly.mdwn @@ -21,10 +21,8 @@ Pseudo-code: RT <- prod1_lo RS <- prod2_lo else - if n = 1 then - round <- [0]*(XLEN -n) || [1]*1 - else - round <- [0]*(XLEN -n) || [1]*1 || [0]*(n-1) + round <- [0]*XLEN + round[XLEN -n] <- 1 prod1_lo <- prod1_lo + round prod2_lo <- prod2_lo + round m <- MASK(n, (XLEN-1)) -- 2.30.2