power_insn: support LD/ST indexed mode
authorDmitry Selyutin <ghostmansd@gmail.com>
Fri, 2 Sep 2022 21:20:16 +0000 (00:20 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sat, 3 Sep 2022 18:41:28 +0000 (21:41 +0300)
src/openpower/decoder/power_insn.py

index 707e2b081f130514140272a2236acc9c729c81a1..0eeaf7b170b35cccf75877547e16a13cbb90b618 100644 (file)
@@ -778,7 +778,46 @@ class LDSTMode(Mode):
         prrc1: prrc1
         prrc0: prrc0
 
+    class idx(Mode):
+        class normal(Mode):
+            """normal mode"""
+            SEA: Mode[2]
+            sz: Mode[3]
+            dz: Mode[3]
+
+        class stride(Mode):
+            """strided (scalar only source)"""
+            SEA: Mode[2]
+            dz: Mode[3]
+            sz: Mode[4]
+
+        class sat(Mode):
+            """sat mode: N=0/1 u/s"""
+            N: Mode[2]
+            dz: Mode[3]
+            sz: Mode[4]
+
+        class prrc1(Mode):
+            """Rc=1: pred-result CR sel"""
+            inv: Mode[2]
+            CRbit: Mode[3, 4]
+
+        class prrc0(Mode):
+            """Rc=0: pred-result z/nonz"""
+            inv: Mode[2]
+            zz: Mode[3]
+            RC1: Mode[4]
+            dz: Mode[3]
+            sz: Mode[3]
+
+        normal: normal
+        stride: stride
+        sat: sat
+        prrc1: prrc1
+        prrc0: prrc0
+
     imm: imm
+    idx: idx
 
 
 class RM(_Mapping):