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]

Re: Arch-independent double-word clz expansion and a few other tweaks for bitscanning


Zack Weinberg wrote:

>     * optabs.c: Remove unnecessary forward declarations.
>     (expand_unop_direct): New, broken out of expand_unop.
>     (expand_doubleword_clz): New.
>     (expand_ctz): Move above expand_ffs.  Use
>     start_sequence, end_sequence, add_equal_note, and
>     expand_unop_direct.  Add more commentary.
>     (expand_ffs): Try both ctz optab and expand_ctz.
>     Generate a test and branch if the hardware doesn't give us
>     a useful value for input zero.  Style improvements similar to
>     expand_ctz.
> 
>     * config/arm/arm.md (ffssi2, ctzsi2): Delete.
>     * config/i386/i386.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
>     * config/i386/i386.md (ffssi2, ffs_cmove, *ffs_no_cmove)
>     (*ffssi_1, ffsdi2, *ffsdi_1): Delete.
>     (*ctzsi2_ccz, *bsr_ccz, *ctzdi2_ccz, *bsr_rex64_ccz)
>     (*bsrhi_ccz): New insns.
>     (ctzdi2): Move next to clzdi2.

This is OK.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]