power_insn: refactor register verbose assembly
authorDmitry Selyutin <ghostmansd@gmail.com>
Sat, 10 Sep 2022 06:07:27 +0000 (09:07 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sat, 10 Sep 2022 06:26:01 +0000 (09:26 +0300)
src/openpower/decoder/power_insn.py

index f705406a2e531abbc9618caa906f0aefaa534017..d2f65580be87984209b1b69a73306db5b833ee45 100644 (file)
@@ -632,7 +632,8 @@ class RegisterOperand(DynamicOperand):
         (vector, value, span) = self.spec(insn=insn, record=record)
 
         if verbosity >= Verbosity.VERBOSE:
-            yield f"{indent}{self.name}"
+            mode = "vector" if vector else "scalar"
+            yield f"{indent}{self.name} ({mode})"
             yield f"{indent}{indent}{int(value):0{value.bits}b}"
             yield f"{indent}{indent}{', '.join(span)}"
             if isinstance(insn, SVP64Instruction):
@@ -642,8 +643,6 @@ class RegisterOperand(DynamicOperand):
                 else:
                     etype = repr(record.etype).lower()
                     yield f"{indent}{indent}{etype}{extra_idx!r}"
-                yield f"{indent}type"
-                yield f"{indent}{indent}{'vector' if vector else 'scalar'}"
         else:
             vector = "*" if vector else ""
             yield f"{vector}{prefix}{int(value)}"