fixedarith: switch divwuX to XLEN
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Mon, 23 Aug 2021 19:04:28 +0000 (19:04 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 30 Aug 2021 16:40:36 +0000 (17:40 +0100)
openpower/isa/fixedarith.mdwn

index 7e98475ef54765a849501385533a433d6f34c9e0..98a32366e4cb94e96717e56e5ae111da37b01d7e 100644 (file)
@@ -416,14 +416,14 @@ XO-Form
 
 Pseudo-code:
 
-    dividend[0:31] <- (RA)[32:63]
-    divisor[0:31] <- (RB)[32:63]
+    dividend[0:(XLEN/2)-1] <- (RA)[XLEN/2:XLEN-1]
+    divisor[0:(XLEN/2)-1] <- (RB)[XLEN/2:XLEN-1]
     if divisor != 0 then
-        RT[32:63] <- dividend / divisor
-        RT[0:31] <- undefined([0]*32)
+        RT[XLEN/2:XLEN-1] <- dividend / divisor
+        RT[0:(XLEN/2)-1] <- undefined([0]*(XLEN/2))
         overflow <- 0
     else
-        RT[0:63] <- undefined([0]*64)
+        RT[0:XLEN-1] <- undefined([0]*XLEN)
         overflow <- 1
 
 Special Registers Altered: