From: Luke Kenneth Casson Leighton Date: Mon, 15 May 2023 22:36:45 +0000 (+0100) Subject: skip reading ewsrc when SVMode is CROP X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=beadc98dfa07e805277d1abb85e1c806da124e24;p=openpower-isa.git skip reading ewsrc when SVMode is CROP --- 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):