change ternlogi to not have Rc field
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 10 Dec 2021 20:34:23 +0000 (12:34 -0800)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 10 Dec 2021 20:34:23 +0000 (12:34 -0800)
openpower/isa/bitmanip.mdwn
openpower/isatables/fields.text
openpower/isatables/minor_5.csv
src/openpower/decoder/isa/caller.py
src/openpower/test/bitmanip/bitmanip_cases.py

index daa6e670b670dc98c470bcb5c85308dd50c64021..650d56e92c6939589a23190c3521ea713264cd66 100644 (file)
@@ -5,8 +5,7 @@
 
 TLI-Form
 
-* ternlogi RT, RA, RB, TLI (Rc=0)
-* ternlogi. RT, RA, RB, TLI (Rc=1)
+* ternlogi RT, RA, RB, TLI
 
 Pseudo-code:
 
@@ -21,4 +20,4 @@ Pseudo-code:
 
 Special Registers Altered:
 
-    CR0                    (if Rc=1)
+    None
index bf9b055c82c3853ee2b6a2f09123cb537d7bbf56..aadf9f5d019842d5117db53a6e1f0ab92112cf41 100644 (file)
    | PO   | SVme |mi0 | mi1 | mi2 | mo0 | mo1 |pst |///  | XO    | / |
 
 # 1.6.34 TLI-FORM
-   |0   |6   |11   |16   |21   |29  |31 |
-   | PO | RT |  RA |  RB | TLI | XO |Rc |
+   |0   |6   |11   |16   |21   |29  |
+   | PO | RT |  RA |  RB | TLI | XO |
 
 # 1.6.28 Instruction Fields
     A (6)
     XO (27:30)
         Extended opcode field.
         Formats: MDS
-    XO (29:30)
-        Extended opcode field.
-        Formats: TLI
     XO (29:31)
         Extended opcode field.
-        Formats: DQ
+        Formats: DQ, TLI
     XO (30)
         Extended opcode field.
         Formats: SC
index ec8d671d1736429d87e1c071800bf281e71401c4..26d7c8b0cc51729ccb46e3116ae4aaffa0820f98 100644 (file)
@@ -1,2 +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-,SHIFT_ROT,OP_TERNLOG,RA,RB,RT,RT,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,ternlogi,TLI,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+--------00-,SHIFT_ROT,OP_TERNLOG,RA,RB,RT,RT,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,ternlogi,TLI,,1,unofficial until submitted and approved/renumbered by the opf isa wg
index 944d0324d09a7dce1ff40d59659c01f9b86864bd..f2a5aded8621e6805c69dfa7dbabb5616d51140d 100644 (file)
@@ -1233,7 +1233,7 @@ class ISACaller(ISACallerHelper, ISAFPHelpers):
             illegal = False
             ins_name = 'ffadds'
 
-        if asmop == 'ternlogi' or asmop == 'ternlogi.':
+        if asmop == 'ternlogi':
             illegal = False
             ins_name = asmop
 
index 8b1120942a2e4f09783c94d0889433922afaf83e..0c73d016db1cffd0af26344976af1a9513e5d8bd 100644 (file)
@@ -12,7 +12,7 @@ def hash_256(v):
 
 
 class BitManipTestCase(TestAccumulatorBase):
-    def do_case_ternlogi(self, rt_v, ra_v, rb_v, imm, rc):
+    def do_case_ternlogi(self, rt_v, ra_v, rb_v, imm):
         po = 5
         xo = 0
         rt = 3
@@ -23,9 +23,8 @@ class BitManipTestCase(TestAccumulatorBase):
         instr = (instr << 5) | ra
         instr = (instr << 5) | rb
         instr = (instr << 8) | imm
-        instr = (instr << 2) | xo
-        instr = (instr << 1) | rc
-        asm = f"ternlogi{'.' * rc} {rt}, {ra}, {rb}, {imm}"
+        instr = (instr << 3) | xo
+        asm = f"ternlogi {rt}, {ra}, {rb}, {imm}"
         lst = [f".4byte {hex(instr)} # {asm}"]
         initial_regs = [0] * 32
         initial_regs[3] = rt_v % 2 ** 64
@@ -36,16 +35,15 @@ class BitManipTestCase(TestAccumulatorBase):
     def case_ternlogi_0(self):
         self.do_case_ternlogi(0x8000_0000_FFFF_0000,
                               0x8000_0000_FF00_FF00,
-                              0x8000_0000_F0F0_F0F0, 0x80, rc=1)
+                              0x8000_0000_F0F0_F0F0, 0x80)
 
     def case_ternlogi_FF(self):
-        self.do_case_ternlogi(0, 0, 0, 0xFF, rc=1)
+        self.do_case_ternlogi(0, 0, 0, 0xFF)
 
-    @skip_case
     def case_ternlogi_random(self):
         for i in range(100):
             imm = hash_256(f"ternlogi imm {i}") & 0xFF
             rt_v = hash_256(f"ternlogi rt {i}") % 2 ** 64
             ra_v = hash_256(f"ternlogi ra {i}") % 2 ** 64
             rb_v = hash_256(f"ternlogi rb {i}") % 2 ** 64
-            self.do_case_ternlogi(rt_v, ra_v, rb_v, imm, rc=1)
+            self.do_case_ternlogi(rt_v, ra_v, rb_v, imm)