From 116e5291a2035c80908205ad735fb3a08be2a2d2 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 21 Nov 2022 20:34:11 +0300 Subject: [PATCH] power_insn: support snz specifier --- src/openpower/decoder/power_insn.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 84cd5e1c..c5c3b51d 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -2940,6 +2940,18 @@ class SpecifierAll(SpecifierBranch): rm.ALL = 1 +@_dataclasses.dataclass(eq=True, frozen=True) +class SpecifierSNZ(SpecifierBranch): + @classmethod + def match(cls, desc, record): + return super().match(desc=desc, record=record, etalon="snz") + + def assemble(self, insn): + rm = insn.prefix.rm.select(record=self.record) + rm.sz = 1 + rm.SNZ = 1 + + class Specifiers(tuple): SPECS = ( SpecifierW, @@ -2961,6 +2973,7 @@ class Specifiers(tuple): SpecifierMRR, SpecifierCRM, SpecifierAll, + SpecifierSNZ, ) def __new__(cls, items, record): -- 2.30.2