power_insn: disassemble RA0 and RT0 correctly
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 31 May 2023 21:05:08 +0000 (00:05 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Thu, 1 Jun 2023 18:38:44 +0000 (21:38 +0300)
src/openpower/decoder/power_insn.py

index d480a3f3dac4073743c1b32cff8451d970a2057c..ca540386560906d0c6a538f648fa793741b714ce 100644 (file)
@@ -1286,6 +1286,9 @@ class ExtendableOperand(DynamicOperand):
             style=Style.NORMAL, prefix="", indent=""):
         (vector, value, span) = self.sv_spec(insn=insn)
 
+        if (self.extra_reg.or_zero and (value == 0)):
+            prefix = ""
+
         if style >= Style.VERBOSE:
             mode = "vector" if vector else "scalar"
             yield f"{indent}{self.name} ({mode})"