pysvp64dis: introduce Suffix helper class
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 17 Aug 2022 10:40:32 +0000 (13:40 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 29 Aug 2022 19:38:10 +0000 (20:38 +0100)
src/openpower/sv/trans/pysvp64dis.py

index 2e63b7d25ec067cbb93ba1842fa1df3e0b4ede39..c2218d0afaf99e1b3f1caa93bdc4fc5702c994aa 100644 (file)
@@ -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):