I'm trying to write (in DMD) the assembler that handles the function :

__m256i _mm256_permute4x64_epi64(__m256i a, in int M);

This translates to vpermq

The closest thing I could find in DMD assembly is VPERMILPS, which is called with:

asm { vpermilps YMM0, YMM1, IMM8; }

However, I cannot find out how to make IMM8 with `in int M`. I can convert int -> short[4] -> ubyte, but I can't move it into imm8

asm { mov imm8, ub; } <-- Fails.


Does anyone have an idea of what this is and how to define it?

Thanks in advance.

Reply via email to