From: Luke Kenneth Casson Leighton Date: Sun, 18 Sep 2022 21:17:22 +0000 (+0100) Subject: simplify predicate mask reporting. assign dw=sw=mask then test 2P X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a4a2762497dbe531c9189c25690224aed900022;p=openpower-isa.git simplify predicate mask reporting. assign dw=sw=mask then test 2P and assign sw new value --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index d9707060..e8194b02 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -1401,19 +1401,12 @@ class NormalLDSTBaseRM(BaseRM): } # predication - single and twin. use "m=" if same otherwise sm/dm - mmode = int(self.mmode) - mask = int(self.mask) + sw = dw = predicates.get((int(self.mmode), int(self.mask))) if record.svp64.ptype is _SVPtype.P2: - (smask, dmask) = (int(self.smask), mask) + sw = predicates.get((int(self.mmode), int(self.smask))) + if sw == dw and dw: + yield "m="+dw else: - (smask, dmask) = (mask, mask) - if smask == dmask: - m = predicates.get((mmode, smask)) - if m: - yield "m="+m - else: - sw = predicates.get((mmode, smask)) - dw = predicates.get((mmode, dmask)) if sw: yield "sm="+sw if dw: