From 715a74c73a87cd806039e4367b88aa3b8c1027e8 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 18 Sep 2022 11:29:36 +0300 Subject: [PATCH] power_insn: support sw specifier --- src/openpower/decoder/power_insn.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 9f80d3a3..a0fcf49c 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -1303,14 +1303,18 @@ class BaseRM(_Mapping): class NormalLDSTBaseRM(BaseRM): @property def specifiers(self): + width = { + 0b11: "8", + 0b10: "16", + 0b01: "32", + } + ew = int(self.elwidth) if ew != 0b00: - ew = { - 0b11: "8", - 0b10: "16", - 0b01: "32", - }[ew] - yield f"ew={ew}" + yield f"ew={width[ew]}" + sw = int(self.ewsrc) + if sw != 0b00: + yield f"sw={width[sw]}" yield from super().specifiers -- 2.30.2