Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1379976
| From | Zhaoxiu Zeng <zengzhaoxiu@163.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3] blackfin: optimize ffz, __ffs, ffs, __fls, and fls functions |
| Date | 2016-04-15 18:20 +0200 |
| Message-ID | <roeDo-5Pa-23@gated-at.bofh.it> (permalink) |
| References | <ro6Pw-81V-13@gated-at.bofh.it> <rodQZ-57f-9@gated-at.bofh.it> <roetI-5Ly-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
在 2016/4/16 0:08, Joe Perches 写道:
> On Fri, 2016-04-15 at 23:20 +0800, zengzhaoxiu@163.com wrote:
>> From: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
>>
>> blackfin has popcount instruction (ONES), we can do the efficient
>> computing (ffz, __ffs, ffs, __fls, and fls) use this instruction.
> []
>> diff --git a/arch/blackfin/include/asm/bitops.h b/arch/blackfin/include/asm/bitops.h
> []
>> +static inline unsigned int __arch_hweight64(__u64 w)
>> +{
>> + return __arch_hweight32((unsigned int)(w >> 32)) +
>> + __arch_hweight32((unsigned int)w);
>> +}
> trivia: perhaps this is more readable as:
>
> return __arch_hweight32(upper_32_bits(w)) +
> __arch_hweight32(lower_32_bits(w));
>
>
Yes.
I just moved these codes from the bottom of bitops.h, didn't change anything.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] blackfin: optimize ffz, __ffs, ffs, __fls, and fls functions zengzhaoxiu@163.com - 2016-04-15 10:00 +0200
[PATCH V2] blackfin: optimize ffz, __ffs, ffs, __fls, and fls functions zengzhaoxiu@163.com - 2016-04-15 10:30 +0200
Re: [PATCH] blackfin: optimize ffz, __ffs, ffs, __fls, and fls functions kbuild test robot <lkp@intel.com> - 2016-04-15 11:20 +0200
[PATCH V3] blackfin: optimize ffz, __ffs, ffs, __fls, and fls functions zengzhaoxiu@163.com - 2016-04-15 17:30 +0200
Re: [PATCH V3] blackfin: optimize ffz, __ffs, ffs, __fls, and fls functions Joe Perches <joe@perches.com> - 2016-04-15 18:10 +0200
Re: [PATCH V3] blackfin: optimize ffz, __ffs, ffs, __fls, and fls functions Zhaoxiu Zeng <zengzhaoxiu@163.com> - 2016-04-15 18:20 +0200
csiph-web