make clear length of constants in divw
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 9 Oct 2020 10:54:03 +0000 (11:54 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 9 Oct 2020 10:54:03 +0000 (11:54 +0100)
openpower/isa/fixedarith.mdwn

index 0e0ebf68da1c225c0c96ef4cb67a32b1c2a313ae..116c98f2e38994323328547464ec648e2d491f76 100644 (file)
@@ -386,9 +386,9 @@ Pseudo-code:
 
     dividend[0:31] <-  (RA)[32:63]
     divisor[0:31] <- (RB) [32:63]
-    if (((dividend = 0x8000_0000) &
-         (divisor = 0xffff_ffff)) |
-         (divisor = 0x0000_0000)) then
+    if (((dividend = ([0]*31 || [1])) &
+         (divisor = [1]*32)) |
+         (divisor = [0]*32)) then
         RT[0:63] <- undefined([0]*64)
         overflow <- 1
     else