From 2ed0117c4ea359a1511de015c69f8f2bc5ba1b64 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 20 Nov 2022 17:17:32 +0300 Subject: [PATCH] power_insn: support els specifier assembly --- src/openpower/decoder/power_insn.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index a9ac1132..58190b46 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -2817,6 +2817,22 @@ class SpecifierDZ(SpecifierXZ): spec.validate(others=items) +@_dataclasses.dataclass(eq=True, frozen=True) +class SpecifierEls(Specifier): + @classmethod + def match(cls, desc, record): + if desc != "els": + return None + + return cls(record=record) + + def assemble(self, insn): + rm = insn.prefix.rm.select(record=self.record) + rm.els = 1 + if self.record.svp64.mode is _SVMode.LDST_IDX: + rm.mode.sel = 1 + + class Specifiers(tuple): SPECS = ( SpecifierW, @@ -2831,6 +2847,7 @@ class Specifiers(tuple): SpecifierZZ, SpecifierSZ, SpecifierDZ, + SpecifierEls, ) def __new__(cls, items, record): -- 2.30.2