From: Dmitry Selyutin Date: Tue, 28 Sep 2021 20:20:33 +0000 (+0000) Subject: decoder/helpers: support XLCASTS X-Git-Tag: sv_maxu_works-initial~809 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2cc67358e7a6767f198cc946c57e882dfbbfefc5;p=openpower-isa.git decoder/helpers: support XLCASTS --- diff --git a/src/openpower/decoder/helpers.py b/src/openpower/decoder/helpers.py index 3b142e1a..84300ba0 100644 --- a/src/openpower/decoder/helpers.py +++ b/src/openpower/decoder/helpers.py @@ -450,6 +450,9 @@ class ISACallerHelper: def XLEN(self): return self.__XLEN + def XLCASTS(self, value): + return SelectableInt(exts(value.value, self.XLEN), self.XLEN) + def XLCASTU(self, value): bits = min(value.bits, self.XLEN) return SelectableInt(value.value & ((1 << bits) - 1), self.XLEN)