From: Dmitry Selyutin Date: Sun, 3 Sep 2023 06:38:10 +0000 (+0300) Subject: insndb/core: walk over opcode value and mask X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64a5a5140b4709e3d7a6880c105ff00c6f078505;p=openpower-isa.git insndb/core: walk over opcode value and mask --- diff --git a/src/openpower/insndb/core.py b/src/openpower/insndb/core.py index 1850def6..867f9c4b 100644 --- a/src/openpower/insndb/core.py +++ b/src/openpower/insndb/core.py @@ -3738,6 +3738,12 @@ class Walker(mdis.walker.Walker): def dispatch_database(self, node): yield from self(tuple(node)) + @mdis.dispatcher.Hook(Opcode) + def dispatch_opcode(self, node): + for key in ("value", "mask"): + value = getattr(node, key) + yield (value, node, key, mdis.walker.AttributePath) + @mdis.dispatcher.Hook(Record) def dispatch_record(self, node): self.__record = node