flat assembler
Message board for the users of flat assembler.
Index
> Main > Moving Certain Quadruplets between YMM registers |
Author |
|
Furs 17 Aug 2020, 13:38
For the first four DWORDS/floats (YMM4[0]...YMM4[3]) you can use vmovaps and vpsrldq:
Code: vmovaps ymm0, ymm4 ; ymm0[0] vpsrldq ymm1, ymm4, 4 ; ymm1[0] vpsrldq ymm2, ymm4, 8 ; ymm2[0] vpsrldq ymm3, ymm4, 12 ; ymm3[0] Code: vextractf128 xmm4, ymm0, 1 ; ymm4[0] vextractf128 xmm5, ymm0, 1 ; ymm5[0] vextractf128 xmm6, ymm0, 1 ; ymm6[0] vextractf128 xmm7, ymm0, 1 ; ymm7[0] |
|||
17 Aug 2020, 13:38 |
|
ml64 18 Aug 2020, 18:02
Furs, thanks a bunch!
It looks like in 2020 there's no effective way to extract certain 32 bits from one YMM register to another. Both vpsrldq and vextractf128 require cleaning the upper bits (e.g. with the vector AND instruction). PEXTRD requires general-purpose register. The simplest way is to store the whole 256 bits value to some variable in the RAM and to take dwords by address: Code: vmovups yword [P],ymm3 invoke glColor3f, float dword [P.r], float dword [P.g], float dword [P.b] invoke glVertex3f, float dword [P.x], float dword [P.y], float dword [P.z] |
|||
18 Aug 2020, 18:02 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.