From: Dmitry Selyutin Date: Tue, 16 Aug 2022 21:40:39 +0000 (+0300) Subject: pysvp64dis: introduce Prefix and RM classes X-Git-Tag: sv_maxu_works-initial~58 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=199a8545b24ac08e6b8d260a68b927b29d358d43;p=openpower-isa.git pysvp64dis: introduce Prefix and RM classes --- diff --git a/src/openpower/sv/trans/pysvp64dis.py b/src/openpower/sv/trans/pysvp64dis.py index 4bd056f9..4923e59f 100644 --- a/src/openpower/sv/trans/pysvp64dis.py +++ b/src/openpower/sv/trans/pysvp64dis.py @@ -59,13 +59,19 @@ class PrefixedInstruction(_SelectableInt): class SVP64Instruction(PrefixedInstruction): - @cached_property - def prefix(self): - return _SVP64PrefixFields(super().prefix) + class Prefix(_SVP64PrefixFields): + class RM(_SVP64RMFields): + @cached_property + def sv_mode(self): + return (self.mode & 0b11) + + @property + def rm(self): + return self.__class__.RM(super().rm) @cached_property - def rm(self): - return _SVP64RMFields(self.prefix.rm) + def prefix(self): + return self.__class__.Prefix(super().prefix) def load(ifile, byteorder, **_):