From: Dmitry Selyutin Date: Mon, 21 Nov 2022 17:32:54 +0000 (+0300) Subject: power_insn: support crm specifier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1cad8f9f71b6271434fdac6d518ba7b2b52c599;p=openpower-isa.git power_insn: support crm specifier --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index ab200663..a6e69dfa 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -2900,6 +2900,21 @@ class SpecifierMRR(Specifier): rm.RG = 1 +@_dataclasses.dataclass(eq=True, frozen=True) +class SpecifierCRM(Specifier): + @classmethod + def match(cls, desc, record): + if desc != "crm": + return None + + return cls(record=record) + + def assemble(self, insn): + rm = insn.prefix.rm.select(record=self.record) + rm.mode.sel = 0 + rm.crm = 1 + + class Specifiers(tuple): SPECS = ( SpecifierW, @@ -2919,6 +2934,7 @@ class Specifiers(tuple): SpecifierSatU, SpecifierMR, SpecifierMRR, + SpecifierCRM, ) def __new__(cls, items, record):