XMM Intrinsics

kinke noone at nowhere.com
Fri May 8 13:56:18 UTC 2020


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. :)

> 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.


More information about the Digitalmars-d-learn mailing list