From 16fd54a93b1db1ca97f0abf2ea5b685b7d090fa9 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Wed, 19 Jul 2023 17:59:32 -0700 Subject: [PATCH] support official instructions that need .long format --- src/openpower/insndb/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openpower/insndb/core.py b/src/openpower/insndb/core.py index 61abc4fd..f441cf8b 100644 --- a/src/openpower/insndb/core.py +++ b/src/openpower/insndb/core.py @@ -258,7 +258,7 @@ class PPCRecord(Dataclass): Rc: _RCOE = _RCOE.NONE form: _Form = _Form.NONE conditions: str = "" - unofficial: bool = False + unofficial: str = "" __KEYMAP = { "unit": "function", @@ -1812,7 +1812,8 @@ class WordInstruction(Instruction): if isinstance(operand, (GPRPairOperand, FPRPairOperand)): paired = True - if style is Style.LEGACY and (paired or record.ppc.unofficial): + # unofficial == "0" means an official instruction that needs .long + 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), -- 2.30.2