[PATCH][ARM][1/4] Replace uses of int_log2 by exact_log2
Kyrill Tkachov
kyrylo.tkachov@foss.arm.com
Thu Jun 2 10:37:00 GMT 2016
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-1.patch
Type: text/x-patch
Size: 1887 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160602/98e36aeb/attachment.bin>
More information about the Gcc-patches
mailing list