power_insn: support slu specifier
authorDmitry Selyutin <ghostmansd@gmail.com>
Mon, 21 Nov 2022 17:36:29 +0000 (20:36 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 2 Jun 2023 18:51:16 +0000 (19:51 +0100)
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):