19.11.2014 21:07, Neil Horman ?????:
> On Wed, Nov 19, 2014 at 05:35:51PM +0600, Yerden Zhumabekov wrote:
>> static inline uint32_t
>> crc32_sse42_u32(uint32_t data, uint32_t init_val)
>> {
>> /*??__asm__ volatile(
>> ????????????"crc32l %[data], %[init_val];"
>> ????????????: [init_val] "+r" (init_val)
>> ????????????: [data] "rm" (data));
>> ????return init_val;*/
>>
>> But wait, will __builtin_ia32_crc32si and __builtin_ia32_crc32di
>> functions do the trick? ICC has them?
> If builtins work on both icc and gcc, yes, that would be a solution as it
> creates non sse instructions when the target cpu doesn't support it.

Can anyone acknowledge?

>
>> What about prototyping functions and extracting their bodies to separate
>> module? Does it break anything?
>>
> That would be a variant on the asm inline idea, but yes, I think that would 
> work
> too

No luck. Performance degrades up to 30-50 percent if extracting
functions to separate module.

-- 
Sincerely,

Yerden Zhumabekov
State Technical Service
Astana, KZ


Reply via email to