On 10 January 2012 10:27, Edgar E. Iglesias <edgar.igles...@gmail.com> wrote:
> +uint32_t helper_clz(uint32_t t0)
> +{
> +    if (t0 == 0) {
> +        return 32;
> +    }
> +    if (t0 == ~0) {
> +        return 0;
> +    }
> +    return clz32(t0);
> +}

I think clz32() handles both the 0 and 0xffffffff cases correctly,
so they don't need special-casing.

-- PMM

Reply via email to