XMM Intrinsics
Marcio Martins
marcioapm at gmail.com
Fri May 8 14:04:28 UTC 2020
On Friday, 8 May 2020 at 13:56:18 UTC, kinke wrote:
> On Friday, 8 May 2020 at 13:30:42 UTC, Marcio Martins wrote:
>> I saw the intel-intrinsics package, but unfortunately it stops
>> at SEE3 and I need SSE4.2 for this.
>>
>> How is this library working?
>
> It's open source. :)
I know, but I don't have time to implement it and make it pretty,
I am prototyping with very little time.
>> Will LDC/LLVM detect the name and replace it with the right
>> instructions? If so, could I just provide an empty
>> _mm_crc32_u8 and it'd pick it up correctly?
>
> Nope. But take a look at ldc.gccbuiltins_x86, it offers these 4
> builtins:
>
> int __builtin_ia32_crc32hi(int, short);
> int __builtin_ia32_crc32si(int, int);
> int __builtin_ia32_crc32qi(int, byte);
> long __builtin_ia32_crc32di(long, long);
>
> Make sure to compile with `-mattr=+sse4.2` to enable these
> instructions.
YES! Thank you, this is exactly what I was looking for.
I suppose I will have to implement a scalar version for DMD
later... I don't even know why I bother with DMD...
More information about the Digitalmars-d-learn
mailing list