swap divisor padding to MSBs in divXe
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 29 Jun 2020 14:37:43 +0000 (15:37 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 29 Jun 2020 14:37:43 +0000 (15:37 +0100)
openpower/isa/fixedarith.mdwn

index cec4de39e0d384b3324c9e2750d96c04021a145a..d18987b8657bef423f6758d246761f8c11d4d1cb 100644 (file)
@@ -388,7 +388,7 @@ XO-Form
 * divweo.  RT,RA,RB (OE=1 Rc=1)
 
     dividend[0:63] <- (RA)[32:63] || [0]*32
-    divisor[0:63] <- (RB)[32:63] || [0]*32
+    divisor[0:63] <- [0]*32 || (RB)[32:63]
     if (divisor = 0x0000_0000_0000_0000) then
         overflow <- 1
     else
@@ -417,7 +417,7 @@ XO-Form
 * divweuo.  RT,RA,RB (OE=1 Rc=1)
 
     dividend[0:63] <- (RA)[32:63] || [0]*32
-    divisor[0:63] <- (RB)[32:63] || [0]*32
+    divisor[0:63] <- [0]*32 || (RB)[32:63]
     if (divisor = 0x0000_0000_0000_0000) then
         overflow <- 1
     else
@@ -635,7 +635,7 @@ XO-Form
 * divdeo.  RT,RA,RB (OE=1 Rc=1)
 
     dividend[0:127] <-  (RA) || [0]*64
-    divisor[0:127] <- (RB) || [0*64]
+    divisor[0:127] <- [0*64] || (RB)
     if divisor = [0]*128 then
         overflow <- 1
     else
@@ -663,7 +663,7 @@ XO-Form
 * divdeuo.  RT,RA,RB (OE=1 Rc=1)
 
     dividend[0:127] <-  (RA) || [0]*64
-    divisor[0:127] <- (RB) || [0*64]
+    divisor[0:127] <- [0*64] || (RB)
     if divisor = [0]*128 then
         overflow <- 1
     else