Fix bug with ROTL32 helper
[soc.git] / src / soc / decoder / helpers.py
index ef28c7ca7ef77a4386c91302401c0a2e6682ca22..e8fd6cb7e1a5c7ca2c535a6213e2a791684577ee 100644 (file)
@@ -40,7 +40,9 @@ def ROTL64(value, bits):
 
 
 def ROTL32(value, bits):
-    return rotl(value, bits, 32)
+    if isinstance(value, SelectableInt):
+        value = SelectableInt(value.value, 64)
+    return rotl(value | (value << 32), bits, 64)
 
 
 def MASK(x, y):