insndb/db: support operand spans
[openpower-isa.git] / 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):