[PATCH][ARM] CLZ optimization for clzsi2 and clzdi2

Doug Kwan (關振德) dougkwan@google.com
Thu May 29 01:28:00 GMT 2008


ping^2

2008/5/5 Doug Kwan (關振德) <dougkwan@google.com>:
> Hi,
>
>    This patch optimizes two libraries function clzsi2 and clzdi2 for
> ARM architecture v5e and above.  This helps Thumb code more than ARM
> code actually.  For ARM, gcc already uses the CLZ instruction instead
> of call clz*i2 functions.  I've tested this patch with arm-sim for
> build with both --with-arch=v5te and without and for both ARM and
> Thumb.  The C regression test produces the same results.
>
>    Can someone review and approve?
>
> -Doug
>
> 2008-05-05  Doug Kwan  <dougkwan@google.com>
>
>        * config/arm/lib1funcs.asm (clzsi2): New function using the CLZ
>        instruction.
>        (clsdi2): Likewise.
>        * config/arm/t-linux-eabi (LIB2FUNCS_EXTRA): Add arm-libgcc2.c
>        (LIB2FUNCS_EXCLUDE): Add _clzdi2 and _clzsi2.
>        (LIB!ASMFUNCS): Likewise.
>        * config/arm/t-bpabi (LIB2FUNCS_EXTRA): Add arm-libgcc2.c
>        (LIB2FUNCS_EXCLUDE): Add _clzdi2 and _clzsi2.
>        (LIB!ASMFUNCS): Likewise.
>        * config/arm/t-arm-elf (LIB2FUNCS_EXTRA): Add arm-libgcc2.c
>        (LIB2FUNCS_EXCLUDE): Add _clzdi2 and _clzsi2.
>        (LIB!ASMFUNCS): Likewise.
>        * config/arm/t-linux (LIB2FUNCS_EXTRA): Add arm-libgcc2.c
>        (LIB2FUNCS_EXCLUDE): Add _clzdi2 and _clzsi2.
>        (LIB!ASMFUNCS): Likewise.
>        * config/arm/arm-libgcc2.c: New file.
>        (__clzsi2): New.
>        (__clzdi2): New.
>


More information about the Gcc-patches mailing list