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

index bcf9296a2143bde55ecab7ab3501df23405bd940..f5acd09e22ac5ad5ac45b086eb6a6204044c81b7 100644 (file)
@@ -278,11 +278,11 @@ X-Form
 
 Pseudo-code:
 
-    n <- (RB)[58:63]
+    n <- (RB)[XLEN-5:XLEN-1]
     r <- ROTL64((RS), n)
-    if (RB)[57] = 0 then
-         m <- MASK(0, 63-n)
-    else m <- [0]*64
+    if (RB)[XLEN-7] = 0 then
+         m <- MASK(0, XLEN-1-n)
+    else m <- [0]*XLEN
     RA <- r & m
 
 Special Registers Altered: