[PATCH][ARM][1/4] Replace uses of int_log2 by exact_log2

Kyrill Tkachov kyrylo.tkachov@foss.arm.com
Thu Jun 9 11:04:00 GMT 2016



On 02/06/16 11:37, Kyrill Tkachov wrote:
> I wanted to ping this patch, but checking the gcc-patches archive I see this wasn't
> archived, though I have confirmed that the patch was sent out and distributed by
> the mail server correctly.
> Anyway, resending...
> Thanks,
> Kyrill
> On 24/05/16 14:25, Kyrill Tkachov wrote:
>> Hi all,
>> The int_log2 function in arm.c is not really useful since we already have a generic function for calculating
>> the log2 of HOST_WIDE_INTs. The only difference in functionality is that int_log2 also asserts that the result
>> is no greater than 31.
>> This patch removes int_log2 in favour of exact_log2 and adds an assert on the result to make sure the return
>> value was as expected.
>> Bootstrapped and tested on arm-none-linux-gnueabihf.
>> Is this ok? Or is there something I'm missing about int_log2?
>> Thanks,
>> Kyrill
>> 2016-05-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>     * config/arm/arm.c (int_log2): Delete definition and prototype.
>>     (shift_op): Use exact_log2 instead of int_log2.
>>     (vfp3_const_double_for_fract_bits): Likewise.

More information about the Gcc-patches mailing list