From 5ab605a6aecdc9a6bdbb0cba7d9d790dea0fef2c 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