power_insn: support slu specifier
authorDmitry Selyutin <ghostmansd@gmail.com>
Mon, 21 Nov 2022 17:36:29 +0000 (20:36 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sun, 15 Jan 2023 19:47:22 +0000 (22:47 +0300)
src/openpower/decoder/power_insn.py

index 2fd14eeb6e0fceb0452f6967265b20504a0f92ba..ea8dc5c4ca1aab020878b35d9922800db759d824 100644 (file)
@@ -2963,6 +2963,17 @@ class SpecifierSL(SpecifierBranch):
         rm.SL = 1
 
 
+@_dataclasses.dataclass(eq=True, frozen=True)
+class SpecifierSLu(SpecifierBranch):
+    @classmethod
+    def match(cls, desc, record):
+        return super().match(desc=desc, record=record, etalon="slu")
+
+    def assemble(self, insn):
+        rm = insn.prefix.rm.select(record=self.record)
+        rm.SLu = 1
+
+
 class Specifiers(tuple):
     SPECS = (
         SpecifierW,
@@ -2986,6 +2997,7 @@ class Specifiers(tuple):
         SpecifierAll,
         SpecifierSNZ,
         SpecifierSL,
+        SpecifierSLu,
     )
 
     def __new__(cls, items, record):