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

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