On 2023-07-19 22:08:24 +0200, Niels Möller wrote: > Vincent Lefevre <[email protected]> writes: > > > On 2023-07-19 21:24:03 +0200, Niels Möller wrote: > >> I think that's needed, to be able to support any size of > >> MINI_GMP_LIMB_TYPE. Something like > >> > >> #define umullo_limb(u, v) \ > >> (sizeof(mp_limb_t) >= sizeof(int)) ? (u)*(v) : (unsigned int)(u) * (v)) > >> > >> If I understand you correctly, the two multiplies in > >> gmp_udiv_qrnnd_preinv and gmp_udiv_qr_3by2 are the only places where we > >> need a mullo operation, i.e., producing the low limb of a limb product? > > > > These are the only ones that affect MPFR, but I haven't looked > > at the whole code. > > Can you try out the attached patch?
No problems when testing MPFR with MINI_GMP_LIMB_TYPE = long, int, short and char, with -m64 and with -m32. -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) _______________________________________________ gmp-bugs mailing list [email protected] https://gmplib.org/mailman/listinfo/gmp-bugs
