AMD amd64 architecture User Manual

Page of 336
128-Bit Media and Scientific Programming
135
24592—Rev. 3.15—November 2009
AMD64 Technology
S—Signed, or Saturation, or Shift
SD—Scalar double-precision floating-point
SI—Signed integer
SS—Scalar single-precision floating-point, or Signed saturation
U—Unsigned, or Unordered, or Unaligned
US—Unsigned saturation
W—Word
x—One or more variable characters in the mnemonic
For example, the mnemonic for the instruction that packs four words into eight unsigned bytes is
PACKUSWB. In this mnemonic, the US designates an unsigned result with saturation, and the WB
designates the source as words and the result as bytes.
4.5.2 Data Transfer
The data-transfer instructions copy operands between a memory location, an XMM register, an MMX
register, or a GPR. The MOV mnemonic, which stands for move, is a misnomer. A copy function is
actually performed instead of a move. A new copy of the source value is created at the destination
address, and the original copy remains unchanged at its source location.
Move.
MOVD—Move Doubleword or Quadword
MOVQ—Move Quadword
MOVDQA—Move Aligned Double Quadword
MOVDQU—Move Unaligned Double Quadword
MOVDQ2Q—Move Quadword to Quadword
MOVQ2DQ—Move Quadword to Quadword
LDDQU—Load Double Quadword Unaligned
The MOVD instruction copies a 32-bit or 64-bit value from a GPR register or memory location to the
low-order 32 or 64 bits of an XMM register, or from the low-order 32 or 64 bits of an XMM register to
a 32-bit or 64-bit GPR or memory location. If the source operand is a GPR or memory location, the
source is zero-extended to 128 bits in the XMM register. If the source is an XMM register, only the
low-order 32 or 64 bits of the source are copied to the destination.
The MOVQ instruction copies a 64-bit value from memory to the low quadword of an XMM register,
or from the low quadword of an XMM register to memory, or between the low quadwords of two
XMM registers. If the source is in memory and the destination is an XMM register, the source is zero-
extended to 128 bits in the XMM register.
The MOVDQA instruction copies a 128-bit value from memory to an XMM register, or from an XMM
register to memory, or between two XMM registers. If either the source or destination is a memory