simplify predicate mask reporting. assign dw=sw=mask then test 2P
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 18 Sep 2022 21:17:22 +0000 (22:17 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 18 Sep 2022 21:17:22 +0000 (22:17 +0100)
and assign sw new value

src/openpower/decoder/power_insn.py

index d9707060f749f6fef8b485648304c152b47a9102..e8194b025a0807ba4e1558b13374c98255c6398a 100644 (file)
@@ -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: