[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation
e_zhumabekov at sts.kz
Wed Nov 19 12:35:51 CET 2014
19.11.2014 16:16, Bruce Richardson пишет:
> On Tue, Nov 18, 2014 at 04:36:24PM -0500, Neil Horman wrote:
>> an alternate option would be to not use the intrinsic, and craft some explicit
>> __asm__ statement that executes the right sse42 instructions. That way the asm
>> is directly emitted, without requiring the -msse42 flag at all, and it will just
>> work in all the files that call it.
> I really don't like that approach. I think using intrinsics is much more
static inline uint32_t
crc32_sse42_u32(uint32_t data, uint32_t init_val)
············"crc32l %[data], %[init_val];"
············: [init_val] "+r" (init_val)
············: [data] "rm" (data));
But wait, will __builtin_ia32_crc32si and __builtin_ia32_crc32di
functions do the trick? ICC has them?
What about prototyping functions and extracting their bodies to separate
module? Does it break anything?
State Technical Service
More information about the dev