movntdqa
Load Double Quadword Non-Temporal Aligned
MOVNTDQA xmm1, m128
Efficiently loads 128-bits from WC memory (Streaming Load).
Details
Loads 128 bits from write-combining (WC) memory into an XMM register using a non-temporal hint to minimize cache pollution. This instruction bypasses the normal cache coherency protocol and is optimized for streaming data loads. Available in SSE4.1 and later; no flags are affected. The memory address should be 16-byte aligned for best performance.
Pseudocode Operation
xmm1 ← [m128];
Example
MOVNTDQA xmm1, [rbp-16]
Encoding
Binary Layout
66
+0
0F
+1
38
+2
2A
+3
Operands
-
dest
128-bit XMM SIMD register -
src
128-bit memory operand
Reference (Intel® SDM)
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| 66 0F 38 2A /r | MOVNTDQA xmm1, m128 | A | V/V | SSE4_1 | Move double quadword from m128 to xmm1 using nontemporal hint if WC memory type. |
| VEX.128.66.0F38.WIG 2A /r | VMOVNTDQA xmm1, m128 | A | V/V | AVX | Move double quadword from m128 to xmm1 using nontemporal hint if WC memory type. |
| VEX.256.66.0F38.WIG 2A /r | VMOVNTDQA ymm1, m256 | A | V/V | AVX2 | Move 256-bit data from m256 to ymm1 using nontemporal hint if WC memory type. |
| EVEX.128.66.0F38.W0 2A /r | VMOVNTDQA xmm1, m128 | B | V/V | (AVX512VL AND AVX512F) OR AVX10.1 | Move 128-bit data from m128 to xmm1 using nontemporal hint if WC memory type. |
| EVEX.256.66.0F38.W0 2A /r | VMOVNTDQA ymm1, m256 | B | V/V | (AVX512VL AND AVX512F) OR AVX10.1 | Move 256-bit data from m256 to ymm1 using nontemporal hint if WC memory type. |
| EVEX.512.66.0F38.W0 2A /r | VMOVNTDQA zmm1, m512 | B | V/V | AVX512F OR AVX10.1 A B | Move 512-bit data from m512 to zmm1 using nontemporal hint if WC memory type. Instruction Operand Encoding1 Op/En Tuple Type Operand 1 Operand 2 Operand 3 Operand 4 N/A ModRM:reg (w) ModRM:r/m (r) N/A N/A Full Mem ModRM:reg (w) ModRM:r/m (r) N/A N/A |
Description
MOVNTDQA loads a double quadword from the source operand (second operand) to the destination operand (first operand) using a non-temporal hint if the memory source is WC (write combining) memory type. For WC memory type, the non-temporal hint may be implemented by loading a temporary internal buffer with the equivalent of an aligned cache line without filling this data to the cache. Any memory-type aliased lines in the cache will be snooped and flushed. Subsequent MOVNTDQA reads to unread portions of the WC cache line will receive data from the temporary internal buffer if data is available. The temporary internal buffer may be flushed by the processor at any time for any reason, for example:
• A load operation other than a MOVNTDQA which references memory already resident in a temporary internal buffer.
• A non-WC reference to memory already resident in a temporary internal buffer.
• Interleaving of reads and writes to a single temporary internal buffer.
• Repeated (V)MOVNTDQA loads of a particular 16-byte item in a streaming line.
• Certain micro-architectural conditions including resource shortages, detection of a mis-speculation condition, and various fault conditions.
The non-temporal hint is implemented by using a write combining (WC) memory type protocol when reading the data from memory. Using this protocol, the processor does not read the data into the cache hierarchy, nor does it fetch the corresponding cache line from memory into the cache hierarchy. The memory type of the region being read can override the non-temporal hint, if the memory address specified for the non-temporal read is not a WC memory region. Information on non-temporal reads and writes can be found in “Caching of Temporal vs. NonTemporal Data” in Chapter 10 in the Intel® 64 and IA-32 Architecture Software Developer’s Manual, Volume 3A.
Because the WC protocol uses a weakly-ordered memory consistency model, a fencing operation implemented with a MFENCE instruction should be used in conjunction with MOVNTDQA instructions if multiple processors might use different memory types for the referenced memory locations or to synchronize reads of a processor with writes by
1. ModRM.MOD != 011B
MOVNTDQA—Load Double Quadword Non-Temporal Aligned Hint Vol. 2B 4-91 other agents in the system. A processor’s implementation of the streaming load hint does not override the effective memory type, but the implementation of the hint is processor dependent. For example, a processor implementation may choose to ignore the hint and process the instruction as a normal MOVDQA for any memory type. Alternatively, another implementation may optimize cache reads generated by MOVNTDQA on WB memory type to reduce cache evictions.
The 128-bit (V)MOVNTDQA addresses must be 16-byte aligned or the instruction will cause a #GP.
The 256-bit VMOVNTDQA addresses must be 32-byte aligned or the instruction will cause a #GP.
The 512-bit VMOVNTDQA addresses must be 64-byte aligned or the instruction will cause a #GP.
Operation
MOVNTDQA (128bit- Legacy SSE Form) DEST := SRC DEST[MAXVL-1:128] (Unmodified) VMOVNTDQA (VEX.128 and EVEX.128 Encoded Form) DEST := SRC DEST[MAXVL-1:128] := 0 VMOVNTDQA (VEX.256 and EVEX.256 Encoded Forms) DEST[255:0] := SRC[255:0] DEST[MAXVL-1:256] := 0 VMOVNTDQA (EVEX.512 Encoded Form) DEST[511:0] := SRC[511:0] DEST[MAXVL-1:512] := 0
Intel C/C++ Compiler Intrinsic Equivalent
VMOVNTDQA __m512i _mm512_stream_load_si512(__m512i const* p); MOVNTDQA __m128i _mm_stream_load_si128 (const __m128i *p); VMOVNTDQA __m256i _mm256_stream_load_si256 (__m256i const* p);
Exceptions
SIMD Floating-Point Exceptions
None.
Other Exceptions
Non-EVEX-encoded instruction, see Table 2-18, “Type 1 Class Exception Conditions.”
EVEX-encoded instruction, see Table 2-47, “Type E1NF Class Exception Conditions.”
Additionally:
#UD If VEX.vvvv != 1111B or EVEX.vvvv != 1111B.
MOVNTDQA—Load Double Quadword Non-Temporal Aligned Hint Vol. 2B 4-92