decoder/helpers: introduce EXTSXL helper
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Sat, 2 Oct 2021 09:18:34 +0000 (09:18 +0000)
committerDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Wed, 13 Oct 2021 18:08:44 +0000 (18:08 +0000)
https://libre-soc.org/openpower/sv/svp64/extsxl

src/openpower/decoder/helpers.py

index be6ab4964621ea4098127404b67eb79d31994ed4..8caa10689b595ddc77a0f457ccfa9f2875e753a3 100644 (file)
@@ -457,6 +457,9 @@ class ISACallerHelper:
         # SelectableInt already takes care of masking out the bits
         return SelectableInt(value.value, self.XLEN)
 
+    def EXTSXL(self, value, bits):
+        return SelectableInt(exts(value.value, bits), self.XLEN)
+
     def __getattr__(self, attr):
         try:
             return globals()[attr]