overhauled simulation function, supports svp64
authorSadoon Albader <sadoon@soulserv.xyz>
Fri, 8 Dec 2023 17:40:16 +0000 (20:40 +0300)
committerSadoon Albader <sadoon@soulserv.xyz>
Fri, 8 Dec 2023 17:40:16 +0000 (20:40 +0300)
crypto/poly1305/poly1305-donna-test.py

index 4974312701fc5d38d2faba29cfe87c3cc6efe2ac..498aa7f4779df394e39abcbea6490839ed7e07a3 100644 (file)
@@ -31,19 +31,11 @@ from openpower.decoder.selectable_int import SelectableInt
 from openpower.simulator.program import Program
 
 
-def simulation(lst,RS,RA,RB):
-
-    initial_regs = [0] * 32
-    initial_regs[0] = RS
-    initial_regs[1] = RA
-    initial_regs[2] = RB
+def simulation_svp(lst,initial_regs):
 
     with Program(lst, bigendian=False) as program:
         sim = run_tst(program, initial_regs)
-        print(sim.gpr)
-        print("gpr 0 is : ")
-        print(hex(sim.gpr[0].value))
-    return sim.gpr(0).value
+    return sim.gpr
 
 # this function is extracted from bigint_cases.py (should be in a library)
 # it is a python implementation of dsrd, see pseudocode in