From: Sadoon Albader Date: Fri, 8 Dec 2023 17:40:16 +0000 (+0300) Subject: overhauled simulation function, supports svp64 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8a4247b4c6341a0beb4ca17795ebe0e7f2391772;p=openpower-isa.git overhauled simulation function, supports svp64 --- diff --git a/crypto/poly1305/poly1305-donna-test.py b/crypto/poly1305/poly1305-donna-test.py index 49743127..498aa7f4 100644 --- a/crypto/poly1305/poly1305-donna-test.py +++ b/crypto/poly1305/poly1305-donna-test.py @@ -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