This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH 19/26] arm: Add optimized ffs for armv6t2
On 02/27/2013 07:51 AM, Måns Rullgård wrote:
> Richard Henderson <rth@twiddle.net> writes:
>
>> +ENTRY(__ffs)
>> + cmp r0, #0
>> + ittt ne
>> + rbitne r0, r0
>> + clzne r0, r0
>> + addne r0, r0, #1
>> + bx lr
>> +END(__ffs)
>
> Making the RBIT unconditional (bit-reverse of zero is still zero) is
> better since it reduces dependencies between instructions. Depending on
> microarchitecture details, this might save a cycle.
>
Fair enough. Consider this change made for any next round.
r~