linux-next: x86-latest/powerpc-next merge conflict
Paul Mackerras
paulus at samba.org
Mon Apr 21 22:13:06 EST 2008
Alexander van Heukelum writes:
> Powerpc would pick up an optimized version via this chain: generic fls64
> ->
> powerpc __fls --> __ilog2 --> asm (PPC_CNTLZL "%0,%1" : "=r" (lz) : "r"
> (x)).
Why wouldn't powerpc continue to use the fls64 that I have in there
now?
> However, the generic version of fls64 first tests the argument for zero.
> From
> your code I derive that the count-leading-zeroes instruction for
> argument zero
> is defined as cntlzl(0) == BITS_PER_LONG.
That is correct. If the argument is 0 then all of the zero bits are
leading zeroes. :)
Regards,
Paul.
More information about the Linuxppc-dev
mailing list