vscatterpf0qpd
Scatter Prefetch Packed Double (L1, Qword Indices)
VSCATTERPF0QPD {k1}, [base+zmm_idx]
Prefetches lines for scatter write (L1, Double, 64-bit idx).
Details
Prefetches cache lines for scatter write operations using 64-bit (qword) indices into a ZMM vector containing doubles, with L1 cache as the target. This non-faulting prefetch hint is masked by the k1 opmask and does not load data or raise exceptions. No flags are affected.
Pseudocode Operation
for (i = 0; i < 8; i++) {
if (k1[i]) {
addr = base + ZMM_idx[i];
prefetch_l1(addr);
}
}
Example
VSCATTERPF0QPD {k1}, [base+zmm_idx]
Encoding
Binary Layout
EVEX
+0
opcode
+4
ModRM
+5
Operands
-
dest
AVX-512 gather/scatter: base register + ZMM vector index
Reference (Intel® SDM)
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| EVEX.512.66.0F38.W0 C6 /5 /vsib | VSCATTERPF0DPS vm32z {k1} | A | V/V | AVX512PF | Using signed dword indices, prefetch sparse byte memory locations containing single precision data using writemask k1 and T0 hint with intent to write. |
| EVEX.512.66.0F38.W0 C7 /5 /vsib | VSCATTERPF0QPS vm64z {k1} | A | V/V | AVX512PF | Using signed qword indices, prefetch sparse byte memory locations containing single precision data using writemask k1 and T0 hint with intent to write. |
| EVEX.512.66.0F38.W1 C6 /5 /vsib | VSCATTERPF0DPD vm32y {k1} | A | V/V | AVX512PF | Using signed dword indices, prefetch sparse byte memory locations containing double precision data using writemask k1 and T0 hint with intent to write. |
| EVEX.512.66.0F38.W1 C7 /5 /vsib | VSCATTERPF0QPD vm64z {k1} | A | V/V | AVX512PF | Using signed qword indices, prefetch sparse byte memory locations containing double precision data using writemask k1 and T0 hint with intent to write. |
Instruction Operand Encoding
| Op/En | Tuple Type | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
|---|---|---|---|---|---|
| A | Tuple1 Scalar | BaseReg (R): VSIB:base, | N/A | N/A | N/A |
Description
The instruction conditionally prefetches up to sixteen 32-bit or eight 64-bit integer byte data elements. The elements are specified via the VSIB (i.e., the index register is an zmm, holding packed indices). Elements will only be prefetched if their corresponding mask bit is one.
cache lines will be brought into exclusive state (RFO) specified by a locality hint (T0):
• T0 (temporal data)—prefetch data into the first level cache.
[PS data] For dword indices, the instruction will prefetch sixteen memory locations. For qword indices, the instruction will prefetch eight values.
[PD data] For dword and qword indices, the instruction will prefetch eight memory locations.
Note that:
(1) The prefetches may happen in any order (or not at all). The instruction is a hint.
(2) The mask is left unchanged.
(3) Not valid with 16-bit effective addresses. Will deliver a #UD fault.
(4) No FP nor memory faults may be produced by this instruction.
(5) Prefetches do not handle cache line splits (6) A #UD is signaled if the memory operand is encoded without the SIB byte.
Operation
BASE_ADDR stands for the memory operand base address (a GPR); may not exist. VINDEX stands for the memory operand vector of indices (a vector register). SCALE stands for the memory operand scalar (1, 2, 4 or 8). DISP is the optional 1, 2 or 4 byte displacement. PREFETCH(mem, Level, State) Prefetches a byte memory location pointed by ‘mem’ into the cache level specified by ‘Level’; a request for exclusive/ownership is done if ‘State’ is 1. Note that the memory location ignore cache line splits. This operation is considered a hint for the processor and may be skipped depending on implementation. VSCATTERPF0DPS/VSCATTERPF0QPS/VSCATTERPF0DPD/VSCATTERPF0QPD—Sparse Prefetch Packed SP/DP Data Values with Vol. 2D 8-36 VSCATTERPF0DPS (EVEX Encoded Version) (KL, VL) = (16, 512) FOR j := 0 TO KL-1 i := j * 32 IF k1[j] Prefetch( [BASE_ADDR + SignExtend(VINDEX[i+31:i]) * SCALE + DISP], Level=0, RFO = 1) FI; ENDFOR VSCATTERPF0DPD (EVEX Encoded Version) (KL, VL) = (8, 512) FOR j := 0 TO KL-1 i := j * 64 k := j * 32 IF k1[j] Prefetch( [BASE_ADDR + SignExtend(VINDEX[k+31:k]) * SCALE + DISP], Level=0, RFO = 1) FI; ENDFOR VSCATTERPF0QPS (EVEX Encoded Version) (KL, VL) = (8, 256) FOR j := 0 TO KL-1 i := j * 64 IF k1[j] Prefetch( [BASE_ADDR + SignExtend(VINDEX[i+63:i]) * SCALE + DISP], Level=0, RFO = 1) FI; ENDFOR VSCATTERPF0QPD (EVEX Encoded Version) (KL, VL) = (8, 512) FOR j := 0 TO KL-1 i := j * 64 k := j * 64 IF k1[j] Prefetch( [BASE_ADDR + SignExtend(VINDEX[k+63:k]) * SCALE + DISP], Level=0, RFO = 1) FI; ENDFOR
Intel C/C++ Compiler Intrinsic Equivalent
VSCATTERPF0DPD void _mm512_prefetch_i32scatter_pd(void *base, __m256i vdx, int scale, int hint); VSCATTERPF0DPD void _mm512_mask_prefetch_i32scatter_pd(void *base, __mmask8 m, __m256i vdx, int scale, int hint); VSCATTERPF0DPS void _mm512_prefetch_i32scatter_ps(void *base, __m512i vdx, int scale, int hint); VSCATTERPF0DPS void _mm512_mask_prefetch_i32scatter_ps(void *base, __mmask16 m, __m512i vdx, int scale, int hint); VSCATTERPF0QPD void _mm512_prefetch_i64scatter_pd(void * base, __m512i vdx, int scale, int hint); VSCATTERPF0QPD void _mm512_mask_prefetch_i64scatter_pd(void * base, __mmask8 m, __m512i vdx, int scale, int hint); VSCATTERPF0QPS void _mm512_prefetch_i64scatter_ps(void * base, __m512i vdx, int scale, int hint); VSCATTERPF0QPS void _mm512_mask_prefetch_i64scatter_ps(void * base, __mmask8 m, __m512i vdx, int scale, int hint);
Exceptions
SIMD Floating-Point Exceptions
None.
Other Exceptions
See Table 2-64, “Type E12NP Class Exception Conditions.”
VSCATTERPF0DPS/VSCATTERPF0QPS/VSCATTERPF0DPD/VSCATTERPF0QPD—Sparse Prefetch Packed SP/DP Data Values with Vol. 2D 8-37