From 292e623191c129adc65afdf76e9f7ece558bbadd Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 6 Nov 2022 12:29:55 +0300 Subject: [PATCH] power_insn: introduce signed immediate operand class --- src/openpower/decoder/power_insn.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 4e12ccd1..08db9529 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -614,6 +614,10 @@ class ImmediateOperand(DynamicOperand): pass +class SignedImmediateOperand(SignedOperand, ImmediateOperand): + pass + + class NonZeroOperand(DynamicOperand): def assemble(self, value, insn, record): if isinstance(value, str): @@ -907,7 +911,7 @@ class Operands(tuple): "SVyd": NonZeroOperand, "SVzd": NonZeroOperand, "BD": SignedOperand, - "D": SignedOperand, # TODO, make a SignedImmediate class? + "D": SignedImmediateOperand, "SI": SignedOperand, "IB": SignedOperand, "LI": SignedOperand, -- 2.30.2