power_insn: fix paired registers disassembly
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 18 Jan 2023 19:58:00 +0000 (22:58 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Jun 2023 18:51:16 +0000 (19:51 +0100)
src/openpower/decoder/power_insn.py

index a87a029f1be4f3402528637962f24d63388ce8ae..f65fe3ad91b5b93fb3639086537b5fb7673a74eb 100644 (file)
@@ -1756,7 +1756,14 @@ class WordInstruction(Instruction):
             yield f"{blob}.long 0x{int(self):08x}"
             return
 
-        if style <= Style.LEGACY and record.ppc.unofficial:
+        paired = False
+        if style is Style.LEGACY:
+            paired = False
+            for (op_cls, _) in record.dynamic_operands:
+                if issubclass(op_cls, (GPRPairOperand, FPRPairOperand)):
+                    paired = True
+
+        if style is Style.LEGACY and (paired or record.ppc.unofficial):
             yield f"{blob}.long 0x{int(self):08x}"
         else:
             operands = tuple(map(_operator.itemgetter(1),