divappr tests

Niels Möller nisse at lysator.liu.se
Mon Dec 14 23:18:13 CET 2009

Torbjorn Granlund <tg at gmplib.org> writes:

> I think you slightly pessimises things by no longer keeping the top
> remainder limb in a register.  I very carefully optimized that code,
> including that aspect.

I don't think I changed that. It's just for the final case, just before
returning, where I do

   udiv_qr_3by2 (q, np[1], np[0], n1, np[1], np[0], d1, d0, dinv);

rather than

   udiv_qr_3by2 (q, n1, n0, n1, np[1], np[0], d1, d0, dinv);
   np[1] = n1;
   np[0] = n0;

The macro uses temporaries _r1 and _r0 and does the copying at the end.
If this change affects register allocation I don't know, but at least
the operations and values should be identical.


Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

More information about the gmp-devel mailing list