Likely GMP bug
Niels Möller
nisse at lysator.liu.se
Sat May 26 21:12:07 UTC 2018
tg at gmplib.org (Torbjörn Granlund) writes:
> I think we should rewrite relevant parts and avoid these constructs.
The reason for the current organization is the multiple variants of the
single-limb loop, and for the oldest one, the strip_u_maybe: label was
less unconventional.
It would help clarity if we could reduce number of variants. If we
delete the unused USE_ZEROTAB code and the unused (?) GCD_1_METHOD == 1
versions, it would be easier to reorganize loop entry.
Do any of the assembly versions use the same algorithm, potentially
suffering from the same bug? I'd guess on most archs one would use the
carry flag and cmov, instead of the
vgtu = LIMB_HIGHBIT_TO_MASK (t);
mask, and then there's no need to make the low one bits of u and v
implicit.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
More information about the gmp-bugs
mailing list