User Guide

210 64-Bit Media Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
The MOVQ instruction copies a 64-bit value from an MMX register or 64-bit memory location to
another MMX register, or from an MMX register to another MMX register or 64-bit memory location.
The MOVDQ2Q instruction copies the low-order 64-bit value in an XMM register to an MMX
register.
The MOVQ2DQ instruction copies a 64-bit value from an MMX register to the low-order 64 bits of an
XMM register, with zero-extension to 128 bits.
The MOVD and MOVQ instructions—along with the PUNPCKx instructions—are often among the
most frequently used instructions in 64-bit media procedures (both integer and floating-point). The
move instructions are similar to the assignment operator in high-level languages.
Move Non-Temporal. The move non-temporal instructions are called streaming-store instructions.
They minimize pollution of the cache. The assumption is that the data they reference will be used only
once, and is therefore not subject to cache-related overhead such as write-allocation. For further
information, see “Memory Optimization” on page 92.
MOVNTQ—Move Non-Temporal Quadword
MASKMOVQ—Mask Move Quadword
The MOVNTQ instruction stores a 64-bit MMX register value into a 64-bit memory location. The
MASKMOVQ instruction stores bytes from the first operand, as selected by the mask value (most-
significant bit of each byte) in the second operand, to a memory location specified in the rDI and DS
registers. The first operand is an MMX register, and the second operand is another MMX register. The
size of the store is determined by the effective address size. Figure 5-11 on page 211 shows the
MASKMOVQ operation.