From 70ce23e596f92af3157df7fcdec1977e92f59806 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Thu, 22 Jun 2023 22:09:07 +0300 Subject: [PATCH] insndb/db: introduce etype command --- src/openpower/insndb/db.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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", -- 2.30.2