From: Dmitry Selyutin Date: Sun, 6 Nov 2022 09:29:55 +0000 (+0300) Subject: power_insn: introduce signed immediate operand class X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=292e623191c129adc65afdf76e9f7ece558bbadd;p=openpower-isa.git power_insn: introduce signed immediate operand class --- 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,