bug 1155: add svshape4 to minor22.csv
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 29 Feb 2024 10:30:08 +0000 (10:30 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 29 Feb 2024 10:30:08 +0000 (10:30 +0000)
openpower/isatables/minor_22.csv
src/openpower/decoder/isa/ed25519/curve25519_mul.py
src/openpower/decoder/isa/remapyield.py
src/openpower/decoder/isa/svshape.py
src/openpower/decoder/power_enums.py
src/openpower/insndb/asm.py

index d8a1c3d5757e50be18b88c8c9e8c0d343638ea2f..56c74f0954ae89020999a38c9785e6d8cf78a2a4 100644 (file)
@@ -25,8 +25,9 @@ opcode,unit,internal op,in1,in2,in3,out,CR in,CR out,inv A,inv out,cry in,cry ou
 1111-011001,VL,OP_SVSHAPE,NONE,NONE,NONE,NONE,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,svshape,SVM,,1,unofficial until submitted and approved/renumbered by the opf isa wg
 # svshape2: {-100,mm,011001}
 100--011001,VL,OP_SVSHAPE,NONE,NONE,NONE,NONE,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,svshape2,SVM2,,1,unofficial until submitted and approved/renumbered by the opf isa wg
-# svshape3 - none of the horribleness of shoe-horning svshape2 in it
------000001,VL,OP_SVSHAPE,NONE,NONE,NONE,NONE,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,svshape3,SVM,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+# svshape3 and svshape4, none of the horribleness of shoe-horning svshape2 in it
+------10000,VL,OP_SVSHAPE,NONE,NONE,NONE,NONE,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,svshape3,SVM,,1,unofficial until submitted and approved/renumbered by the opf isa wg
+------11000,VL,OP_SVSHAPE,NONE,NONE,NONE,NONE,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,svshape4,SVI2,,1,unofficial until submitted and approved/renumbered by the opf isa wg
 # A/V bitmanip
 1101001110-,ALU,OP_AVGADD,RA,RB,NONE,RT,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC_ONLY,0,0,avgadd,X,,1,unofficial until submitted and approved/renumbered by the opf isa wg
 --01101110-,ALU,OP_SHADD,RA,RB,NONE,RT,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC_ONLY,0,0,sadd,Z23,,1,unofficial until submitted and approved/renumbered by the opf isa wg
index 5c93daad0cf0ab089ce705b5f653d46ef6a75746..dbc87bbbeda4df19f05ee3f236362284093c783c 100644 (file)
@@ -34,8 +34,9 @@ r1 +=   c;
 """
 
 import random
-from ed25519util import (add128_64, lo128, shr128, 
-                         reduce_mask_51, MASK64, MASK128)
+from openpower.decoder.isa.ed25519.ed25519util import (add128_64,
+                                               lo128, shr128, 
+                                               reduce_mask_51, MASK64, MASK128)
 from copy import deepcopy
 
 
index 42b0478541149ac0791fe3bea9b3148e0df32626..c4df68387704d0d5db4a93f4309318ef7c204418 100644 (file)
@@ -185,18 +185,20 @@ def demo():
     dump_shape(SVSHAPE0)
 
     # triangle
+    xdim, ydim, zdim = 1, 5, 5 # set the dimension sizes here
     print("\ntriangle", xdim, ydim, zdim)
-    xdim, ydim, zdim = 1, 3, 5 # set the dimension sizes here
     SVSHAPE0 = SVSHAPE()
     SVSHAPE0.lims = [xdim, ydim, zdim]
     SVSHAPE0.order = [0,1,2]  # experiment with different permutations, here
     SVSHAPE0.mode = 0b11
     SVSHAPE0.submode = 0b10      # triangle mode
     SVSHAPE0.submode2 = 0b000    #
-    SVSHAPE0.skip = 0b00
+    SVSHAPE0.skip = 0b11
     SVSHAPE0.offset = 0       # experiment with different offset, here
     SVSHAPE0.invxyz = [0,0,0] # inversion if desired
 
+    dump_shape(SVSHAPE0)
+
     # triangle
     print("\ntriangle-bigmul", xdim, ydim, zdim)
     xdim, ydim, zdim = 1, 3, 5 # set the dimension sizes here
index ce833a148ac22be89d7858f3ccb155d8023a1e24..81c08dbf4c341227f08eba4d912b133386fe995a 100644 (file)
@@ -51,7 +51,7 @@ class SVSHAPE(SelectableInt):
 
     def is_triangle(self):
         "REMAP Triangle Mode"
-        return self.mode == 0b11 and self._skip in [0b00, 0b01]
+        return self.mode == 0b11 and self._skip in [0b10, 0b11]
 
     @property
     def submode2(self):
index 56272546be387caa888ce2cac08c4bbe3bb5dd61..081af72593c7a518e7901490e53cc82b50f6c2c9 100644 (file)
@@ -819,6 +819,7 @@ _insns = [
     "svshape",  # https://libre-soc.org/openpower/sv/remap/#svshape
     "svshape2",  # https://libre-soc.org/openpower/sv/remap/#svshape2 TODO
     "svshape3",  # https://libre-soc.org/openpower/sv/remap/#svshape3 TODO
+    "svshape4",  # https://libre-soc.org/openpower/sv/remap/#svshape4 TODO
     "svstep",  # https://libre-soc.org/openpower/sv/setvl
     "sim_cfg",
     "sadd", "saddw", "sadduw",
index 0d7f8c06d0b4cd0ee539b05a91c18ce8025c7910..5713ed43a4a5014b929e7dbf381db7bc4bd08bc3 100644 (file)
@@ -310,6 +310,9 @@ if __name__ == '__main__':
     lst = [
         #"sv.cmp/ff=gt *0,*1,*2,0",
         "dsld 5,4,5,3",
+        'svshape2 8, 1, 31, 7, 1, 1',
+        'svshape4 5,5,0,0,0,3,3,0',  # SVSHAPE0, triangle mode
+
 
     ]
     isa = SVP64Asm(lst, macros=macros)