From beadc98dfa07e805277d1abb85e1c806da124e24 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 15 May 2023 23:36:45 +0100 Subject: [PATCH] skip reading ewsrc when SVMode is CROP --- src/openpower/decoder/power_insn.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 1e909669..a1f37a06 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -2068,6 +2068,11 @@ class WidthBaseRM(BaseRM): FP = False dw = WidthBaseRM.width(FP, int(self.elwidth)) sw = WidthBaseRM.width(FP, int(self.ewsrc)) + if self.record.svp64.mode is _SVMode.CROP: + if dw: + yield ("dw=" + dw) + else: + sw = WidthBaseRM.width(FP, int(self.ewsrc)) if dw == sw and dw: yield ("w=" + dw) else: @@ -2503,7 +2508,8 @@ class SpecifierW(SpecifierWidth): def assemble(self, insn): selector = insn.select(record=self.record) - selector.ewsrc = self.width.value + if self.record.svp64.mode is not _SVMode.CROP: + selector.ewsrc = self.width.value selector.elwidth = self.width.value @@ -2511,6 +2517,8 @@ class SpecifierW(SpecifierWidth): class SpecifierSW(SpecifierWidth): @classmethod def match(cls, desc, record): + if record.svp64.mode is _SVMode.CROP: + return None return super().match(desc=desc, record=record, etalon="sw") def assemble(self, insn): -- 2.30.2