insndb/db: support operand spans
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 4 Jun 2023 10:00:25 +0000 (13:00 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sun, 4 Jun 2023 10:00:25 +0000 (13:00 +0300)
src/openpower/insndb/db.py

index 707bdaaf1f8c24c51b680048024cd97c95bfcab4..3247a26d1259d7806ceaf198388f13ad0130f9c3 100644 (file)
@@ -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):