From: Jacob Lifshay Date: Mon, 9 Oct 2023 04:46:14 +0000 (-0700) Subject: fix generating invalid divmod tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98d7efec701e3274811b5e6e48e0309b83c35ebc;p=openpower-isa.git fix generating invalid divmod tests --- 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):