From e1cad8f9f71b6271434fdac6d518ba7b2b52c599 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 21 Nov 2022 20:32:54 +0300 Subject: [PATCH] power_insn: support crm specifier --- src/openpower/decoder/power_insn.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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): -- 2.30.2