fixedarith: switch modud to XLEN
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Tue, 24 Aug 2021 12:01:25 +0000 (12:01 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 30 Aug 2021 16:44:20 +0000 (17:44 +0100)
openpower/isa/fixedarith.mdwn

index 736e580a35e5b1480a8a67b54284d55a842300b3..c8aeb2f63c87ab63e5c351a2b7ace336437476c5 100644 (file)
@@ -805,8 +805,8 @@ Pseudo-code:
 
     dividend <- (RA)
     divisor <- (RB)
-    if (divisor = [0]*64) then
-        RT[0:63] <- undefined([0]*64)
+    if (divisor = [0]*XLEN) then
+        RT[0:XLEN-1] <- undefined([0]*XLEN)
         overflow <- 1
     else
         RT <- dividend % divisor