From: Konstantinos Margaritis Date: Thu, 20 Jul 2023 15:51:39 +0000 (+0000) Subject: Fix failing cases, all tests pass now X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ee1575810c3349df377a2f48cf9a99882bc82d0;p=openpower-isa.git Fix failing cases, all tests pass now --- diff --git a/openpower/isa/butterfly.mdwn b/openpower/isa/butterfly.mdwn index a1825ad8..93a6c4bc 100644 --- a/openpower/isa/butterfly.mdwn +++ b/openpower/isa/butterfly.mdwn @@ -16,18 +16,18 @@ Pseudo-code: prod1 <- MULS(RB, sum) prod2 <- MULS(RB, diff) if n = 0 then - prod1_lo <- prod1[XLEN:(XLEN*2)-1] - prod2_lo <- prod2[XLEN:(XLEN*2)-1] + prod1_lo <- prod1[XLEN:(XLEN*2) - 1] + prod2_lo <- prod2[XLEN:(XLEN*2) - 1] RT <- prod1_lo RS <- prod2_lo else round <- [0]*(XLEN*2) - round[XLEN*2 -n] <- 1 + round[XLEN*2 - n] <- 1 prod1 <- prod1 + round prod2 <- prod2 + round - m <- MASK(XLEN-n, XLEN-1) - res1 <- prod1[XLEN-n:XLEN*2 -n -1] - res2 <- prod2[XLEN-n:XLEN*2 -n -1] + m <- MASK(XLEN - n - 2, XLEN - 1) + res1 <- prod1[XLEN - n:XLEN*2 - n - 1] + res2 <- prod2[XLEN - n:XLEN*2 - n - 1] signbit1 <- prod1[0] signbit2 <- prod2[0] smask1 <- ([signbit1]*XLEN) & ¬m @@ -50,21 +50,21 @@ Pseudo-code: n <- SH prod <- MULS(RB, RA) if n = 0 then - prod_lo <- prod[XLEN:(XLEN*2)-1] + prod_lo <- prod[XLEN:(XLEN*2) - 1] RT <- (RT) + prod_lo RS <- (RS) - prod_lo else - res1 <- (RT) + prod - res2 <- (RS) - prod + res1[0:XLEN*2-1] <- (EXTSXL((RT)[0], 1) || (RT)) + prod + res2[0:XLEN*2-1] <- (EXTSXL((RS)[0], 1) || (RS)) - prod round <- [0]*XLEN*2 - round[XLEN*2 -n] <- 1 + round[XLEN*2 - n] <- 1 res1 <- res1 + round res2 <- res2 + round signbit1 <- res1[0] signbit2 <- res2[0] - m <- MASK(XLEN-n, (XLEN-1)) - res1 <- prod1[XLEN-n:XLEN*2 -n -1] - res2 <- prod2[XLEN-n:XLEN*2 -n -1] + m <- MASK(XLEN -n - 2, XLEN - 1) + res1 <- res1[XLEN - n:XLEN*2 - n -1] + res2 <- res2[XLEN - n:XLEN*2 - n -1] smask1 <- ([signbit1]*XLEN) & ¬m smask2 <- ([signbit2]*XLEN) & ¬m RT <- (res1 | smask1)