From: Dmitry Selyutin Date: Sun, 11 Dec 2022 16:53:25 +0000 (+0300) Subject: power_insn: support pi/lf specifiers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9bd69361c3acce8672ee255e96d1866d29d2ff73;p=openpower-isa.git power_insn: support pi/lf specifiers --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index d0799952..b8cbcf98 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -3066,6 +3066,34 @@ class SpecifierCTi(SpecifierVS): rm.CTi = 1 +@_dataclasses.dataclass(eq=True, frozen=True) +class SpecifierPI(Specifier): + @classmethod + def match(cls, desc, record): + if desc != "pi": + return None + + return cls(record=record) + + def assemble(self, insn): + rm = insn.prefix.rm.select(record=self.record) + rm.pi = 1 + + +@_dataclasses.dataclass(eq=True, frozen=True) +class SpecifierLF(Specifier): + @classmethod + def match(cls, desc, record): + if desc != "lf": + return None + + return cls(record=record) + + def assemble(self, insn): + rm = insn.prefix.rm.select(record=self.record) + rm.lf = 1 + + class Specifiers(tuple): SPECS = ( SpecifierW, @@ -3097,6 +3125,8 @@ class Specifiers(tuple): SpecifierVSbi, SpecifierCTR, SpecifierCTi, + SpecifierPI, + SpecifierLF, ) def __new__(cls, items, record):