From: Dmitry Selyutin Date: Sun, 3 Sep 2023 06:36:09 +0000 (+0300) Subject: insndb/core: walk over record opcodes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a6cdbcee899209dbdfe17d10365e6f07cc10838;p=openpower-isa.git insndb/core: walk over record opcodes --- 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)