use proper register sizes
authorKonstantinos Margaritis <konstantinos.margaritis@vectorcamp.gr>
Fri, 28 Apr 2023 11:48:48 +0000 (11:48 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Jun 2023 18:51:17 +0000 (19:51 +0100)
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: