From 8b09aeda6df1d5a50fcb0cd6a785501208280baa Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Sun, 8 Oct 2023 21:46:14 -0700 Subject: [PATCH] fix generating invalid divmod tests --- src/openpower/test/bigint/powmod.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openpower/test/bigint/powmod.py b/src/openpower/test/bigint/powmod.py index 89826eae..a4d9bc50 100644 --- a/src/openpower/test/bigint/powmod.py +++ b/src/openpower/test/bigint/powmod.py @@ -524,8 +524,7 @@ class PowModCases(TestAccumulatorBase): d = 2 ** 256 - 1 if d == 0: d = 1 - if n >= d << 256: - n -= d << 256 + n %= d << 256 yield (n, d) def case_divmod_shift_sub_512x256_to_256x256(self): -- 2.30.2