This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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.
Attachment:
patch.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |