power_insn: simplify specifiers sorting
authorDmitry Selyutin <ghostmansd@gmail.com>
Tue, 20 Sep 2022 11:36:18 +0000 (14:36 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 20 Sep 2022 11:36:18 +0000 (14:36 +0300)
src/openpower/decoder/power_insn.py

index 94aa8f5744e5093f7ae339e0e43980c194019f3a..cfc1bf6f322208f52afe6560689f75951fdc199e 100644 (file)
@@ -1969,9 +1969,8 @@ class SVP64Instruction(PrefixedInstruction):
             Rc = bool(record.mdwn.operands["Rc"].value)
         rm = self.prefix.rm.select(record=record, Rc=Rc)
 
-        # convert specifiers to /x/y/z
-        specifiers = list(rm.specifiers(record=record))
-        specifiers.sort() # sort lexicographically
+        # convert specifiers to /x/y/z (sorted lexicographically)
+        specifiers = sorted(rm.specifiers(record=record))
         if specifiers: # if any add one extra to get the extra "/"
             specifiers = ([""] + specifiers)
         specifiers = "/".join(specifiers)