From dc285d1164128a250964ee0f3325192791f782b8 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sat, 10 Sep 2022 01:05:40 +0300 Subject: [PATCH] power_insn: drop redundant dataclass incantations --- src/openpower/decoder/power_insn.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 565ec85c..bf6da71f 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -512,7 +512,6 @@ class Operand: raise NotImplementedError -@_dataclasses.dataclass(eq=True, frozen=True) class DynamicOperand(Operand): def disassemble(self, insn, record, verbosity=Verbosity.NORMAL, indent=""): @@ -530,11 +529,6 @@ class DynamicOperand(Operand): yield str(int(value)) -@_dataclasses.dataclass(eq=True, frozen=True) -class ImmediateOperand(DynamicOperand): - pass - - @_dataclasses.dataclass(eq=True, frozen=True) class StaticOperand(Operand): value: int @@ -555,7 +549,10 @@ class StaticOperand(Operand): yield str(int(value)) -@_dataclasses.dataclass(eq=True, frozen=True) +class ImmediateOperand(DynamicOperand): + pass + + class DynamicOperandReg(DynamicOperand): def spec(self, insn, record, merge): vector = False @@ -662,7 +659,6 @@ class DynamicOperandGPR(DynamicOperandGPRFPR): verbosity=verbosity, indent=indent) -@_dataclasses.dataclass(eq=True, frozen=True) class DynamicOperandFPR(DynamicOperandGPRFPR): def disassemble(self, insn, record, verbosity=Verbosity.NORMAL, indent=""): @@ -672,7 +668,6 @@ class DynamicOperandFPR(DynamicOperandGPRFPR): verbosity=verbosity, indent=indent) -@_dataclasses.dataclass(eq=True, frozen=True) class DynamicOperandTargetAddr(DynamicOperandReg): def disassemble(self, insn, record, field, verbosity=Verbosity.NORMAL, indent=""): @@ -692,7 +687,6 @@ class DynamicOperandTargetAddr(DynamicOperandReg): _SelectableInt(value=0b00, bits=2)))) -@_dataclasses.dataclass(eq=True, frozen=True) class DynamicOperandTargetAddrLI(DynamicOperandTargetAddr): def span(self, record): return record.fields["LI"] -- 2.30.2