From 82e11d5e4db5c31fb34750ab49d86865ea70db55 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sat, 2 Oct 2021 09:18:34 +0000 Subject: [PATCH] decoder/helpers: introduce EXTSXL helper https://libre-soc.org/openpower/sv/svp64/extsxl --- src/openpower/decoder/helpers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/openpower/decoder/helpers.py b/src/openpower/decoder/helpers.py index be6ab496..8caa1068 100644 --- a/src/openpower/decoder/helpers.py +++ b/src/openpower/decoder/helpers.py @@ -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] -- 2.30.2