From f54c84425556e71aa61fb0bc80d1a95590d2067a Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 18 Sep 2022 12:01:04 +0300 Subject: [PATCH] power_insn: support w/dw/sw specifiers --- src/openpower/decoder/power_insn.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 4e900b15..5426bfb0 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -1309,12 +1309,15 @@ class NormalLDSTBaseRM(BaseRM): 0b01: "32", } - ew = int(self.elwidth) - if ew != 0b00: - yield f"ew={width[ew]}" + dw = int(self.elwidth) sw = int(self.ewsrc) - if sw != 0b00: - yield f"sw={width[sw]}" + if all((dw, sw)) and dw == sw: + yield f"w={width[dw]}" + else: + if dw != 0b00: + yield f"dw={width[dw]}" + if sw != 0b00: + yield f"sw={width[sw]}" yield from super().specifiers -- 2.30.2