Marco Bodrato <bodr...@mail.dm.unipi.it> writes:

  This unlikely branch may end up with an odd up[0]...

Ineed.

  >     }
  >       int cnt;
  >       count_trailing_zeros (cnt, up[0]);
  >       mpn_rshift (up, up, N, cnt);

  ... and on some platform mpn_rshift may not support cnt==0.

That was taken care of in ny last version.

  Maybe (for the C version) we should duplicate the ctz/shift
  instruction, both inside the UNLIKELY (*up == 0) branch (deciding
  whether to shift or copy) and in an else (likely) branch.

I added a goto, I think that is an OK solution.

-- 
Torbjörn
Please encrypt, key id 0xC8601622
_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to