From: Luke Kenneth Casson Leighton Date: Fri, 29 Sep 2023 18:23:59 +0000 (+0100) Subject: moving the temp array (t) along, so that adding to y is the same size X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8fb718c52599ac066cf1ffb1453276e96f8237a;p=openpower-isa.git 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. , --- 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