fixedshift: switch slwX to XLEN
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Tue, 31 Aug 2021 20:24:13 +0000 (20:24 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 1 Sep 2021 19:17:29 +0000 (20:17 +0100)
openpower/isa/fixedshift.mdwn

index 3bf0c301c7266854bb860f9e50ee9e3d3df130f8..ab94e9a4e8ad1a4a2d42bfc3355a933ad484e295 100644 (file)
@@ -190,11 +190,11 @@ X-Form
 
 Pseudo-code:
 
-    n <- (RB)[59:63]
-    r <- ROTL32((RS)[32:63], n)
-    if (RB)[58] = 0 then
-         m <- MASK32(0, 31-n)
-    else m <- [0]*64
+    n <- (RB)[XLEN-5:XLEN-1]
+    r <- ROTL32((RS)[XLEN/2:XLEN-1], n)
+    if (RB)[XLEN-6] = 0 then
+         m <- MASK32(0, ((XLEN/2)-1-n))
+    else m <- [0]*XLEN
     RA <- r & m
 
 Special Registers Altered: