From 0d53cbcd30ceec4d64faa8967cf4be8a9dd49c65 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 29 Sep 2023 19:23:59 +0100 Subject: [PATCH] moving the temp array (t) along, so that adding to y is the same size in bigmul python-based code. idea is to make everything line up and be as uniform as possible, reduce number of instructions to bare min. , --- src/openpower/test/bigint/powmod.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/openpower/test/bigint/powmod.py b/src/openpower/test/bigint/powmod.py index 109237cc..72fc239c 100644 --- a/src/openpower/test/bigint/powmod.py +++ b/src/openpower/test/bigint/powmod.py @@ -112,14 +112,13 @@ def python_mul_algorithm2(a, b): il.append(i) y = [0] * 8 - t = [0] * 5 + t = [0] * 8 for iy in range(4): - t[4] = 0 for i in range(4): - t[i], t[4] = maddedu(a[iy], b[i], t[4]) + t[iy+i], t[iy+4] = maddedu(a[iy], b[i], t[iy+4]) ca = 0 for i in range(5): - y[iy + i], ca = adde(y[iy + i], t[i], ca) + y[iy + i], ca = adde(y[iy + i], t[iy+i], ca) return y -- 2.30.2