- def concrete_record(self, record):
- for operand in record.dynamic_operands:
- print(operand.name, ",".join(map(str, operand.span)))
- for operand in record.static_operands:
- if operand.name not in ("PO", "XO"):
- desc = f"{operand.name}={operand.value}"
- print(desc, ",".join(map(str, operand.span)))
+ @contextlib.contextmanager
+ def record(self, record):
+ with super().record(record=record):
+ if self.current_record.name == self.arguments["insn"]:
+ for operand in record.dynamic_operands:
+ print(operand.name, ",".join(map(str, operand.span)))
+ for operand in record.static_operands:
+ if operand.name not in ("PO", "XO"):
+ desc = f"{operand.name}={operand.value}"
+ print(desc, ",".join(map(str, operand.span)))
+
+ yield record