From 167c2e7a0408d6d7e799a30c95a807a8f104c8fa Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 28 Aug 2022 15:58:35 +0300 Subject: [PATCH] power_insn: simplify fields --- src/openpower/decoder/power_insn.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 411ec02e..53bf32d6 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -568,11 +568,8 @@ class Instruction(_Mapping): class WordInstruction(Instruction): - class PO(_Mapping): - _: _Field = range(0, 6) - _: _Field = range(0, 32) - po: PO + PO: _Field = range(0, 6) @classmethod def integer(cls, value, byteorder="little"): @@ -596,7 +593,7 @@ class PrefixedInstruction(Instruction): _: _Field = range(64) prefix: Prefix suffix: Suffix - po: Suffix.PO = Suffix.po + PO: Suffix.PO @classmethod def integer(cls, value, byteorder="little"): @@ -623,10 +620,9 @@ class PrefixedInstruction(Instruction): class SVP64Instruction(PrefixedInstruction): + """SVP64 instruction: https://libre-soc.org/openpower/sv/svp64/""" class Prefix(PrefixedInstruction.Prefix): - """SVP64 Prefix: https://libre-soc.org/openpower/sv/svp64/""" class RM(_Mapping): - """SVP64 RM: https://libre-soc.org/openpower/sv/svp64/""" _: _Field = range(24) mmode: _Field = (0,) mask: _Field = range(1, 4) @@ -648,15 +644,9 @@ class SVP64Instruction(PrefixedInstruction): range(16, 19), ) - # Backward compatibility - spr: _Field = _ - id: _Field = (7, 9) rm: RM = ((6, 8) + tuple(range(10, 32))) - # Backward compatibility - insn: PrefixedInstruction.Prefix - prefix: Prefix def disassemble(self, db): -- 2.30.2