change to undef()
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 9 Oct 2020 00:30:39 +0000 (17:30 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 9 Oct 2020 00:30:39 +0000 (17:30 -0700)
openpower/isa/fixedarith.mdwn

index 121a743b47fe31b37471889d66838cd87f0f5693..9d7bcf78d7063b939a3c2f192d4566570ec5cf93 100644 (file)
@@ -389,11 +389,11 @@ Pseudo-code:
     if (((dividend = 0x8000_0000) &
          (divisor = 0xffff_ffff)) |
          (divisor = 0x0000_0000)) then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
         overflow <- 1
     else
         RT[32:63] <- DIVS(dividend, divisor)
-        RT[0:31] <- undefined[0:31]
+        RT[0:31] <- undef([0]*32)
         overflow <- 0
 
 Special Registers Altered:
@@ -416,10 +416,10 @@ Pseudo-code:
     divisor[0:31] <- (RB)[32:63]
     if divisor != 0 then
         RT[32:63] <-  dividend / divisor
-        RT[0:31] <- undefined[0:31]
+        RT[0:31] <- undef([0]*32)
         overflow <- 0
     else
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
         overflow <- 1
 
 Special Registers Altered:
@@ -449,12 +449,12 @@ Pseudo-code:
         result32[0:63] <- EXTS64(result[32:63])
         if (result32 = result) then
             RT[32:63] <- result[32:63]
-            RT[0:31] <- undefined[0:31]
+            RT[0:31] <- undef([0]*32)
             overflow <- 0
         else
             overflow <- 1
     if overflow = 1 then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
 
 Special Registers Altered:
 
@@ -480,12 +480,12 @@ Pseudo-code:
         result <- dividend / divisor
         if RA[32:63] <u RB[32:63] then
             RT[32:63] <- result[32:63]
-            RT[0:31] <- undefined[0:31]
+            RT[0:31] <- undef([0]*32)
             overflow <- 0
         else
             overflow <- 1
     if overflow = 1 then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
 
 Special Registers Altered:
 
@@ -505,10 +505,11 @@ Pseudo-code:
     if (((dividend = 0x8000_0000) &
          (divisor = 0xffff_ffff)) |
          (divisor = 0x0000_0000)) then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
         overflow <- 1
     else
         RT[0:63] <- EXTS64(MODS(dividend, divisor))
+        RT[0:31] <- undef(RT[0:31])
         overflow <- 0
 
 Special Registers Altered:
@@ -526,11 +527,11 @@ Pseudo-code:
     dividend[0:31] <- (RA) [32:63]
     divisor [0:31] <- (RB) [32:63]
     if divisor = 0x0000_0000 then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
         overflow <- 1
     else
         RT[32:63] <- dividend % divisor
-        RT[0:31] <- undefined[0:31]
+        RT[0:31] <- undef([0]*32)
         overflow <- 0
 
 Special Registers Altered:
@@ -668,7 +669,7 @@ Pseudo-code:
     if (((dividend = 0x8000_0000_0000_0000) &
          (divisor = 0xffff_ffff_ffff_ffff)) |
          (divisor = 0x0000_0000_0000_0000)) then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
         overflow <- 1
     else
         RT <- DIVS(dividend, divisor)
@@ -693,7 +694,7 @@ Pseudo-code:
     dividend[0:63] <- (RA)
     divisor[0:63] <- (RB)
     if (divisor = 0x0000_0000_0000_0000) then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
         overflow <- 1
     else
         RT <- dividend / divisor
@@ -730,7 +731,7 @@ Pseudo-code:
         else
             overflow <- 1
     if overflow = 1 then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
 
 Special Registers Altered:
 
@@ -760,7 +761,7 @@ Pseudo-code:
         else
             overflow <- 1
     if overflow = 1 then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
 
 Special Registers Altered:
 
@@ -780,7 +781,7 @@ Pseudo-code:
     if (((dividend = 0x8000_0000_0000_0000) &
          (divisor = 0xffff_ffff_ffff_ffff)) |
          (divisor = 0x0000_0000_0000_0000)) then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
         overflow <- 1
     else
         RT       <- MODS(dividend, divisor)
@@ -801,7 +802,7 @@ Pseudo-code:
     dividend <- (RA)
     divisor  <- (RB)
     if (divisor = 0x0000_0000_0000_0000) then
-        RT[0:63] <- undefined[0:63]
+        RT[0:63] <- undef([0]*64)
         overflow <- 1
     else
         RT       <- dividend % divisor