power_insn: support BRANCH and CR mode stubs
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 11 Sep 2022 18:15:52 +0000 (21:15 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 12 Sep 2022 20:41:44 +0000 (21:41 +0100)
src/openpower/decoder/power_insn.py

index 9034f37c850b71c255bd9662eb8a818d7431a2ff..c07e53e716cc2cea773cb8aef9aea9f9b9035c79 100644 (file)
@@ -1435,7 +1435,13 @@ class SVP64Instruction(PrefixedInstruction):
         mode = self.prefix.rm.mode
         sel = mode.sel
 
-        if record.svp64.mode is _SVMode.NORMAL:
+        if record.svp64.mode is _SVMode.BRANCH:
+            return (self.prefix.rm.mode, "branch")
+
+        elif record.svp64.mode is _SVMode.CROP:
+            return (self.prefix.rm.mode, "crop")
+
+        elif record.svp64.mode is _SVMode.NORMAL:
             mode = mode.normal
             if sel == 0b00:
                 if mode[2] == 0b0:
@@ -1532,9 +1538,6 @@ class SVP64Instruction(PrefixedInstruction):
             if isinstance(mode, cls):
                 return (mode, desc)
 
-        if record.svp64.mode is _SVMode.BRANCH:
-            return (self.prefix.rm.mode, "branch")
-
         raise ValueError(self)
 
     def disassemble(self, db,