From b24e9b50bb9f104ee01f7716ff2a264e1e472b59 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 4 Jun 2023 13:00:25 +0300 Subject: [PATCH] insndb/db: support operand spans --- src/openpower/insndb/db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openpower/insndb/db.py b/src/openpower/insndb/db.py index 707bdaaf..3247a26d 100644 --- a/src/openpower/insndb/db.py +++ b/src/openpower/insndb/db.py @@ -74,10 +74,11 @@ class OpcodesVisitor(InstructionVisitor): class OperandsVisitor(InstructionVisitor): def concrete_record(self, record): for operand in record.dynamic_operands: - print(operand.name) + print(operand.name, ",".join(map(str, operand.span))) for operand in record.static_operands: if operand.name not in ("PO", "XO"): - print(operand.name, operand.value, sep="=") + desc = f"{operand.name}={operand.value}" + print(desc, ",".join(map(str, operand.span))) class PCodeVisitor(InstructionVisitor): -- 2.30.2