fixedshift: switch sradiX to XLEN
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Tue, 31 Aug 2021 20:00:52 +0000 (20:00 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 31 Aug 2021 20:22:41 +0000 (21:22 +0100)
openpower/isa/fixedshift.mdwn

index 6e73a68374354eafdfd0dc01f55eadbac3ebfab3..0d4fb6c8f27fba0ec7f43709c8a1c6251efd650c 100644 (file)
@@ -319,10 +319,10 @@ XS-Form
 Pseudo-code:
 
     n <- sh
-    r <- ROTL64((RS), 64-n)
-    m <- MASK(n, 63)
+    r <- ROTL64((RS), XLEN-n)
+    m <- MASK(n, (XLEN-1))
     s <- (RS)[0]
-    RA <- r&m | ([s]*64)& ¬m
+    RA <- r&m | ([s]*XLEN)& ¬m
     carry <- s & ((r& ¬m) != 0)
     CA    <- carry
     CA32  <- carry