add ternaryi
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 5 Nov 2021 23:10:35 +0000 (16:10 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 5 Nov 2021 23:10:35 +0000 (16:10 -0700)
openpower/isatables/RM-1P-2S1D.csv
openpower/isatables/fields.text
openpower/isatables/minor_5.csv [new file with mode: 0644]
src/openpower/decoder/power_decoder.py
src/openpower/decoder/power_enums.py

index 8da5faabc3cccba3622bbf2a7324ca4903464a0c..1d0cd7ba3c91418179040b09bfdf1996fef960be 100644 (file)
@@ -80,6 +80,7 @@ divduo,,1P,EXTRA3,d:RT;d:CR0,s:RA,s:RB,0,RA,RB,0,RT,0,CR0,0
 divwuo,,1P,EXTRA3,d:RT;d:CR0,s:RA,s:RB,0,RA,RB,0,RT,0,CR0,0
 divdo,,1P,EXTRA3,d:RT;d:CR0,s:RA,s:RB,0,RA,RB,0,RT,0,CR0,0
 divwo,,1P,EXTRA3,d:RT;d:CR0,s:RA,s:RB,0,RA,RB,0,RT,0,CR0,0
+ternaryi,,1P,EXTRA3,d:RT;d:CR0,s:RA,s:RB,0,RA,RB,0,RT,0,CR0,0
 ffadds,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
 fdivs,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
 fsubs,,1P,EXTRA3,d:FRT;d:CR1,s:FRA,s:FRB,0,FRA,FRB,0,FRT,0,CR1,0
index f1ba11efb1372c13d1a24337ccd9f53bd0003c74..3baa6fdf4eba9ff6ac1000e7f109e9b674187545 100644 (file)
    |0     |6     |11  |13   |15   |17   |19   |21  |22   |26     |31 |
    | PO   | SVme |mi0 | mi1 | mi2 | mo0 | mo1 |pst |///  | XO    | / |
 
+# 1.6.34 TI-FORM
+   |0   |6   |11   |16   |21   |29  |31 |
+   | PO | RT |  RA |  RB | TII | XO |Rc |
+
 # 1.6.28 Instruction Fields
     A (6)
         Field used by the tbegin. instruction to specify an
          and dcbtst instructions (see Section 4.3.2 of Book
          II).
          Formats: X
+    TII (21:28)
+         Field used by the ternaryi instruction as the
+         look-up table.
+         Formats: TI
     TO (6:10)
          Field used to specify the conditions on which to
          trap.     The    encoding     is    described   in
     XO (27:30)
         Extended opcode field.
         Formats: MDS
+    XO (29:30)
+        Extended opcode field.
+        Formats: TI
     XO (29:31)
         Extended opcode field.
         Formats: DQ
diff --git a/openpower/isatables/minor_5.csv b/openpower/isatables/minor_5.csv
new file mode 100644 (file)
index 0000000..8fa5c11
--- /dev/null
@@ -0,0 +1,2 @@
+opcode,unit,internal op,in1,in2,in3,out,CR in,CR out,inv A,inv out,cry in,cry out,ldst len,BR,sgn ext,upd,rsrv,32b,sgn,rc,lk,sgl pipe,comment,form,CONDITIONS,unofficial,comment2
+--------00-,ALU,OP_TERNARYI,RA,RB,CONST_TII,RT,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,ternaryi,TI,,1,unofficial until submitted and approved/renumbered by the opf isa wg
index f579a75cd04a32f5db1358f451c8c15248d9a2a4..8fabeabcb63bfc4d0b8f53bf614c4e4d8f777c18 100644 (file)
@@ -734,6 +734,8 @@ def create_pdecode(name=None, col_subset=None, row_subset=None,
                    opint=True, bitsel=(0, 2), suffix=None, subdecoders=[]),
         Subdecoder(pattern=22, opcodes=get_csv("minor_22.csv"),
                    opint=True, bitsel=(1, 5), suffix=None, subdecoders=[]),
+        Subdecoder(pattern=5, opcodes=get_csv("minor_5.csv"),
+                   opint=True, bitsel=(0, 11), suffix=None, subdecoders=[]),
     ]
 
     # FP 63L/H decoders. TODO: move mffsfamily to separate subdecoder
index c6dd9efa08f3ab44560a59b601aac0df2e026867..ec9ed77d8b4a5d982a6ebf16266d09a13427be63 100644 (file)
@@ -120,6 +120,7 @@ class Form(Enum):
     SVDS = 31  # Simple-V for LD/ST bit-reverse, variant of DS-Form
     SVM = 32  # Simple-V SHAPE mode - TEMPORARY TEMPORARY TEMPORARY
     SVRM = 33  # Simple-V REMAP mode - TEMPORARY TEMPORARY TEMPORARY
+    TI = 34  # ternaryi
 
 # Simple-V svp64 fields https://libre-soc.org/openpower/sv/svp64/
 
@@ -329,6 +330,7 @@ _insns = [
     "subf", "subfc", "subfco", "subfe", "subfeo", "subfic",
     "subfme", "subfmeo", "subfo", "subfze", "subfzeo",
     "sync",
+    "ternaryi",
     "td", "tdi",
     "tlbie", "tlbiel",
     "tw", "twi",
@@ -433,6 +435,7 @@ class MicrOp(Enum):
     OP_ADDG6S = 83
     OP_CDTBCD = 84
     OP_CBCDTD = 85
+    OP_TERNARYI = 86
 
 
 @unique
@@ -475,6 +478,7 @@ class In3Sel(Enum):
     FRS = 3
     FRC = 4
     RC = 5  # for SVP64 bit-reverse LD/ST
+    CONST_TII = 6  # for ternaryi
 
 
 @unique