On Sun, May 19, 2019 at 12:25:04PM -0500, Scott Cheloha wrote: > guenther@ has pointed out in a separate mail that I can make the diff > smaller with a cast and that it's acceptable here. As with the code > it's replacing I've left a comment explaining what we're doing.
There is a rather obvious bug in the function for n < 0, but that's older. You should get better assembly by using an intermediate cast to uint64_t anyway, esp. if the compiler can't prove that n is positive. Joerg