From 1332cab74c71fd48e643f7aaf039c0d8467c40cb Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 28 Sep 2021 20:17:42 +0000 Subject: [PATCH] decoder/helpers: support XLCASTU --- src/openpower/decoder/helpers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openpower/decoder/helpers.py b/src/openpower/decoder/helpers.py index d51305b9..3b142e1a 100644 --- a/src/openpower/decoder/helpers.py +++ b/src/openpower/decoder/helpers.py @@ -450,6 +450,10 @@ class ISACallerHelper: def XLEN(self): return self.__XLEN + def XLCASTU(self, value): + bits = min(value.bits, self.XLEN) + return SelectableInt(value.value & ((1 << bits) - 1), self.XLEN) + def __getattr__(self, attr): return getattr(sys.modules[ISACallerHelper.__module__], attr) -- 2.30.2