From: Dmitry Selyutin Date: Wed, 17 Aug 2022 10:40:32 +0000 (+0300) Subject: pysvp64dis: introduce Suffix helper class X-Git-Tag: sv_maxu_works-initial~52 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5f96648e128482f67551740dfdd66f55a75c0e79;p=openpower-isa.git pysvp64dis: introduce Suffix helper class --- diff --git a/src/openpower/sv/trans/pysvp64dis.py b/src/openpower/sv/trans/pysvp64dis.py index 2e63b7d2..c2218d0a 100644 --- a/src/openpower/sv/trans/pysvp64dis.py +++ b/src/openpower/sv/trans/pysvp64dis.py @@ -85,6 +85,9 @@ class SVP64Instruction(PrefixedInstruction): def rm(self): return self.__class__.RM(super().rm) + class Suffix(Instruction): + pass + def __init__(self, prefix, suffix, byteorder=ByteOrder.LITTLE): if SVP64Instruction.Prefix(prefix).pid != 0b11: raise SVP64Instruction.PrefixError(prefix) @@ -97,6 +100,10 @@ class SVP64Instruction(PrefixedInstruction): def prefix(self): return self.__class__.Prefix(super().prefix) + @cached_property + def suffix(self): + return self.__class__.Suffix(super().suffix) + def load(ifile, byteorder, **_): def load(ifile):