insndb/core: walk over record opcodes
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 3 Sep 2023 06:36:09 +0000 (09:36 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Wed, 6 Sep 2023 18:56:09 +0000 (21:56 +0300)
src/openpower/insndb/core.py

index 903f55bd4c8f3d5489369d70afbb7b4170223e37..1850def6d11ee7ad716956c2e48decc462189f93 100644 (file)
@@ -810,6 +810,9 @@ class Record(Dataclass):
     class Opcodes(tuple):
         pass
 
+    class Opcode(Opcode):
+        pass
+
     @property
     def extras(self):
         if self.svp64 is not None:
@@ -894,7 +897,7 @@ class Record(Dataclass):
         for (value, mask) in pairs:
             value = Opcode.Value(binary(value))
             mask = Opcode.Mask(binary(mask))
-            result.append(Opcode(value=value, mask=mask))
+            result.append(self.__class__.Opcode(value=value, mask=mask))
 
         return self.__class__.Opcodes(result)