From a7bc133bc1abd0ee80f6a1bf8c0fc0a6ad2d7e02 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 6 Nov 2022 12:29:55 +0300 Subject: [PATCH] power_insn: support FPR operands assembly --- src/openpower/decoder/power_insn.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 933741b8..279db99c 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -759,6 +759,14 @@ class GPROperand(RegisterOperand): class FPROperand(RegisterOperand): + def assemble(self, value, insn, record): + if isinstance(value, str): + value = value.lower() + if value.startswith("f"): + value = value[1:] + value = int(value, 0) + return super().assemble(value=value, insn=insn, record=record) + def disassemble(self, insn, record, verbosity=Verbosity.NORMAL, indent=""): prefix = "" if (verbosity <= Verbosity.SHORT) else "f" -- 2.30.2