endeavouring to implement shift-carry-dsld
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 Oct 2022 00:55:23 +0000 (01:55 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 28 Oct 2022 07:33:22 +0000 (08:33 +0100)
openpower/isa/svfixedarith.mdwn
src/openpower/decoder/helpers.py

index 2bd6864f4d50137d96e3c29be350605e882ad16c..ad528604ab0e34331446265a47c597d1c356a2fc 100644 (file)
@@ -55,13 +55,10 @@ VA2-Form
 
 Pseudo-code:
 
-    hi <- (RC)
-    lo <- (RA)
-    sh <- (RB)
-    n <- sh[58:63]
-    mask[0:63] <- MASK(n, 63)
-    v[0:63] <- (hi & mask) | (lo & ¬mask)
-    RT <- ROTL64(v, n)
+    n <- (RB)[58:63]
+    v <- ROTL128([0]*64 || (RA), n)
+    RT <- v[64:127] | ((RC) & MASK(n, 63))
+    RS <- v[0:63]
 
 Special Registers Altered:
 
index ea3b659a5db7b3f44461900b8d605f4bc75c0525..71d305dfd7f14ba760e795d49cf50b91381190f3 100644 (file)
@@ -843,6 +843,9 @@ class ISACallerHelper:
         value = rotl(value, bits, self.XLEN)
         return value
 
+    def ROTL128(self, value, bits):
+        return rotl(value, bits, self.XLEN*2)
+
     def ROTL64(self, value, bits):
         return rotl(value, bits, self.XLEN)