From: Dmitry Selyutin Date: Tue, 28 Sep 2021 20:17:42 +0000 (+0000) Subject: decoder/helpers: support XLCASTU X-Git-Tag: sv_maxu_works-initial~810 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1332cab74c71fd48e643f7aaf039c0d8467c40cb;p=openpower-isa.git decoder/helpers: support XLCASTU --- 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)