From ffcf913086df4da0ba4b7b530085d3d6b94ef7d4 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 27 Sep 2023 19:13:47 +0100 Subject: [PATCH] add seeming-redundant addc/adde (actually part of big-mul-*add*) which completes the pattern for REMAP transformation --- src/openpower/test/bigint/powmod.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openpower/test/bigint/powmod.py b/src/openpower/test/bigint/powmod.py index 04ae3564..d25486d3 100644 --- a/src/openpower/test/bigint/powmod.py +++ b/src/openpower/test/bigint/powmod.py @@ -97,6 +97,9 @@ def python_mul_algorithm2(a, b): y = [0] * 8 t = [0] * 5 + y[0], ca = addc(y[0], t[0]) + for i in range(4): + y[1 + i], ca = adde(y[1 + i], t[1 + i], ca) for i in range(4): y[i], y[4] = maddedu(a[0], b[i], y[4]) t[4] = 0 @@ -277,7 +280,7 @@ if __name__ == "__main__": # now test python_mul_algorithm2 *against* python_mul_algorithm import random random.seed(0) # reproducible values - for i in range(10): + for i in range(10000): a = [] b = [] for j in range(4): -- 2.30.2