From 37ccbdb860c5746fcff18d5f685972bb3d1f9b46 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Thu, 22 Jun 2023 21:43:03 +0300 Subject: [PATCH] insndb/db: introduce selectors command --- src/openpower/insndb/db.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/openpower/insndb/db.py b/src/openpower/insndb/db.py index 4c725fee..4d3b91da 100644 --- a/src/openpower/insndb/db.py +++ b/src/openpower/insndb/db.py @@ -106,7 +106,7 @@ class PCodeVisitor(InstructionVisitor): yield node -class ExtrasVisitor(SVP64InstructionVisitor): +class SelectorsVisitor(InstructionVisitor): @mdis.dispatcher.Hook( In1Sel, In2Sel, In3Sel, CRInSel, CRIn2Sel, OutSel, CROutSel, @@ -120,6 +120,8 @@ class ExtrasVisitor(SVP64InstructionVisitor): print(typename, node) yield node + +class ExtrasVisitor(SVP64InstructionVisitor, SelectorsVisitor): @mdis.dispatcher.Hook(SVP64Record.ExtraMap) @contextlib.contextmanager def dispatch_extramap(self, node): @@ -163,6 +165,10 @@ def main(): PCodeVisitor, "print instruction pseudocode", ), + "selectors": ( + SelectorsVisitor, + "print instruction selectors", + ), "extras": ( ExtrasVisitor, "print instruction extras (SVP64)", -- 2.30.2