fix divweu bug
authorJacob Lifshay <programmerjake@gmail.com>
Tue, 6 Oct 2020 01:00:50 +0000 (18:00 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Tue, 6 Oct 2020 01:02:08 +0000 (18:02 -0700)
openpower/isa/fixedarith.mdwn

index f8511652c73f9cc1f1f4f7d3cf92c869a65c86c5..4fda5dc2be1483c46f41b3e41b7a596e7d4b494b 100644 (file)
@@ -475,8 +475,8 @@ Pseudo-code:
     if (divisor = 0x0000_0000_0000_0000) then
         overflow <- 1
     else
-        result <- dividend /  divisor
-        if (RA) < (RB) then
+        result <- dividend / divisor
+        if RA[32:63] <u RB[32:63] then
             RT[32:63] <- result[32:63]
             RT[0:31] <- undefined[0:31]
             overflow <- 0