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
> maintainable.
>
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?
What about prototyping functions and extracting their bodies to separate
module? Does it break anything?
--
Sincerely,
Yerden Zhumabekov
State Technical Service
Astana, KZ