From 0419c029379f7f8cd1e84711f15c07bba2c73a7f Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Fri, 9 Sep 2022 15:16:45 +0300 Subject: [PATCH] power_insn: simplify code --- src/openpower/decoder/power_insn.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.30.2