This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] CLZ optimization for clzsi2 and clzdi2
- From: "=?big5?b?RG91ZyBLd2FuICjD9q62vHcp?=" <dougkwan at google dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 14 May 2008 10:47:35 -0700
- Subject: Re: [PATCH][ARM] CLZ optimization for clzsi2 and clzdi2
- References: <498552560805051522q1159c087ic0602dc5e205b8ee@mail.gmail.com>
ping
2008/5/5 Doug Kwan (Ãö®¶¼w) <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.
>