From: Luke Kenneth Casson Leighton Date: Wed, 28 Feb 2024 20:55:09 +0000 (+0000) Subject: bug 1155: redo SVShape is_triangle X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a3fee6f355478e5f6b4a4bb09d76dabf181e653e;p=openpower-isa.git bug 1155: redo SVShape is_triangle --- diff --git a/src/openpower/decoder/isa/svshape.py b/src/openpower/decoder/isa/svshape.py index 9525b153..ce833a14 100644 --- a/src/openpower/decoder/isa/svshape.py +++ b/src/openpower/decoder/isa/svshape.py @@ -51,10 +51,7 @@ class SVSHAPE(SelectableInt): def is_triangle(self): "REMAP Triangle Mode" - return False # FIXME(lkcl): causes a RecursionError through `skip` - # please don't push a revert without also fixing it: - # https://bugs.libre-soc.org/show_bug.cgi?id=1155#c55 - return self.mode == 0b11 and self.skip in [0b00, 0b01] + return self.mode == 0b11 and self._skip in [0b00, 0b01] @property def submode2(self): @@ -145,17 +142,20 @@ class SVSHAPE(SelectableInt): def submode(self): return self.fsi['skip'].asint(msb0=True) + @property + def _skip(self): + return self.fsi['skip'].asint(msb0=True) + @property def skip(self): if self.is_indexed() or self.is_triangle(): inv = self.fsi['invxyz'].asint(msb0=True) return (inv & 0b100) >> 2 - return self.fsi['skip'].asint(msb0=True) + return self._skip @skip.setter def skip(self, value): - assert not (self.is_indexed() or self.is_triangle()) # TODO - self.fsi['skip'].eq(value) + return self.fsi['skip'].eq(value) @property def offset(self):