use proper register sizes
authorKonstantinos Margaritis <konstantinos.margaritis@vectorcamp.gr>
Fri, 28 Apr 2023 11:48:48 +0000 (11:48 +0000)
committerKonstantinos Margaritis <konstantinos.margaritis@vectorcamp.gr>
Thu, 4 May 2023 15:31:10 +0000 (15:31 +0000)
openpower/isa/butterfly.mdwn

index 0d799a6830cddca27bf84743dfedc4ad8213da84..b6fecae2ae1c2f1bbb178f7bab5228d0269228c8 100644 (file)
@@ -13,12 +13,12 @@ Pseudo-code:
     n <- XLEN-SH
     sum <- (RT) + (RA)
     diff <- (RT) - (RA)
-    prod1 <- MULS(RB, sum)
-    prod2 <- MULS(RB, diff)
+    prod1[0:(XLEN*2)-1] <- MULS(RB, sum)
+    prod2[0:(XLEN*2)-1] <- MULS(RB, diff)
     res1 <- prod1[XLEN/2-SH:XLEN-1-SH]
     res2 <- prod2[XLEN/2-SH:XLEN-1-SH]
-    RT <- (RT) + res1
-    RS <- (RS) + res2
+    RT <- (RT) + EXTS(res1)
+    RS <- (RS) + EXTS(res2)
 
 Special Registers Altered: