From: Dmitry Selyutin Date: Thu, 22 Jun 2023 19:09:07 +0000 (+0300) Subject: insndb/db: introduce etype command X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70ce23e596f92af3157df7fcdec1977e92f59806;p=openpower-isa.git insndb/db: introduce etype command --- diff --git a/src/openpower/insndb/db.py b/src/openpower/insndb/db.py index e64fdc1e..b0411d25 100644 --- a/src/openpower/insndb/db.py +++ b/src/openpower/insndb/db.py @@ -18,6 +18,7 @@ from openpower.insndb.core import ( Walker, ) from openpower.decoder.power_enums import ( + SVEType, SVPType, SVExtra, In1Sel, @@ -122,6 +123,14 @@ class SelectorsVisitor(InstructionVisitor): yield node +class ETypeVisitor(SVP64InstructionVisitor): + @mdis.dispatcher.Hook(SVEType) + @contextlib.contextmanager + def dispatch_ptype(self, node): + print(node) + yield node + + class PTypeVisitor(SVP64InstructionVisitor): @mdis.dispatcher.Hook(SVPType) @contextlib.contextmanager @@ -178,6 +187,10 @@ def main(): SelectorsVisitor, "print instruction selectors", ), + "etype": ( + ETypeVisitor, + "print instruction etype", + ), "ptype": ( PTypeVisitor, "print instruction ptype",