From 1425cbc9747a82291ac86a086b96b763e3bd298f Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 3 Sep 2023 09:36:09 +0300 Subject: [PATCH] insndb/core: walk over record opcodes --- src/openpower/insndb/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openpower/insndb/core.py b/src/openpower/insndb/core.py index 903f55bd..1850def6 100644 --- a/src/openpower/insndb/core.py +++ b/src/openpower/insndb/core.py @@ -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) -- 2.30.2