From: Dmitry Selyutin Date: Fri, 9 Sep 2022 12:16:45 +0000 (+0300) Subject: power_insn: simplify code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0419c029379f7f8cd1e84711f15c07bba2c73a7f;p=openpower-isa.git power_insn: simplify code --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 907e3acd..1175fc11 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -573,9 +573,12 @@ class DynamicOperandReg(DynamicOperand): if isinstance(insn, SVP64Instruction): span = tuple(map(lambda bit: (bit + 32), span)) value = insn[span] + span = tuple(map(str, span)) if isinstance(insn, SVP64Instruction): extra_idx = self.extra_idx(record=record) + if extra_idx is _SVExtra.NONE: + return (vector, value, span) if record.etype is _SVEtype.EXTRA3: spec = insn.prefix.rm.extra3[extra_idx] @@ -586,7 +589,6 @@ class DynamicOperandReg(DynamicOperand): if spec != 0: vector = bool(spec[0]) - span = tuple(map(str, span)) spec_span = spec.__class__ if record.etype is _SVEtype.EXTRA3: spec_span = tuple(map(str, spec_span[1, 2])) @@ -604,8 +606,6 @@ class DynamicOperandReg(DynamicOperand): (value, span) = merge(vector, value, span, spec, spec_span) - span = tuple(map(str, span)) - return (vector, value, span) @property