모두의 코드
VPCOMPRESSD (Intel x86/64 assembly instruction)
VPCOMPRESSD
Store Sparse Packed Doubleword Integer Values into Dense Memory/Register
참고 사항
아래 표를 해석하는 방법은 x86-64 명령어 레퍼런스 읽는 법 글을 참조하시기 바랍니다.
Opcode/ | Op/ | 64/32 | CPUID | Description |
---|---|---|---|---|
| T1S | V/V | AVX512VL | Compress packed doubleword integer values from xmm2 to xmm1/m128 using controlmask k1. |
| T1S | V/V | AVX512VL | Compress packed doubleword integer values from ymm2 to ymm1/m256 using controlmask k1. |
| T1S | V/V | AVX512F | Compress packed doubleword integer values from zmm2 to zmm1/m512 using controlmask k1. |
Instruction Operand Encoding
Op/En | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
---|---|---|---|---|
T1S | ModRM:r/m (w) | ModRM:reg (r) | NA | NA |
Description
Compress (store) up to 16/8/4 doubleword integer values from the source operand (second operand) to the desti-nation operand (first operand). The source operand is a ZMM/YMM/XMM register, the destination operand can be a ZMM/YMM/XMM register or a 512/256/128-bit memory location.
The opmask register k1 selects the active elements (partial vector or possibly non-contiguous if less than 16 active elements) from the source operand to compress into a contiguous vector. The contiguous vector is written to the destination starting from the low element of the destination operand.
Memory destination version: Only the contiguous vector is written to the destination memory location. EVEX.z must be zero.
Register destination version: If the vector length of the contiguous vector is less than that of the input vector in the source operand, the upper bits of the destination register are unmodified if EVEX.z is not set, otherwise the upper bits are zeroed.
Note: EVEX.vvvv is reserved and must be 1111b otherwise instructions will #UD.
Note that the compressed displacement assumes a pre-scaling (N) corresponding to the size of one single element instead of the size of the full vector.
Operation
VPCOMPRESSD (EVEX encoded versions) store form
(KL, VL) = (4, 128), (8, 256), (16, 512) SIZE <-!= 32 k <- 0 FOR j <- 0 TO KL-1 i <- j * 32 IF k1[j] OR *no controlmask* THEN DEST[k+SIZE-1:k]<- SRC[i+31:i] k <- k + SIZE FI; ENDFOR;
VPCOMPRESSD (EVEX encoded versions) reg-reg form
(KL, VL) = (4, 128), (8, 256), (16, 512) SIZE <-!= 32 k <- 0 FOR j <- 0 TO KL-1 i <- j * 32 IF k1[j] OR *no controlmask* THEN DEST[k+SIZE-1:k]<- SRC[i+31:i] k <- k + SIZE FI; ENDFOR IF *merging-masking* THEN *DEST[VL-1:k] remains unchanged* ELSE DEST[VL-1:k] <- 0 FI DEST[MAX_VL-1:VL] <- 0
Intel C/C++ Compiler Intrinsic Equivalent
VPCOMPRESSD __m512i _mm512_mask_compress_epi32(__m512i s, __mmask16 c, __m512i a); VPCOMPRESSD __m512i _mm512_maskz_compress_epi32(__mmask16 c, __m512i a); VPCOMPRESSD void _mm512_mask_compressstoreu_epi32(void* a, __mmask16 c, __m512i s); VPCOMPRESSD __m256i _mm256_mask_compress_epi32(__m256i s, __mmask8 c, __m256i a); VPCOMPRESSD __m256i _mm256_maskz_compress_epi32(__mmask8 c, __m256i a); VPCOMPRESSD void _mm256_mask_compressstoreu_epi32(void* a, __mmask8 c, __m256i s); VPCOMPRESSD __m128i _mm_mask_compress_epi32(__m128i s, __mmask8 c, __m128i a); VPCOMPRESSD __m128i _mm_maskz_compress_epi32(__mmask8 c, __m128i a); VPCOMPRESSD void _mm_mask_compressstoreu_epi32(void* a, __mmask8 c, __m128i s);
SIMD Floating-Point Exceptions
None
Other Exceptions
EVEX-encoded instruction, see Exceptions Type E4.nb.
댓글을 불러오는 중입니다..