User Guide
128-Bit Media and Scientific Programming 123
24592—Rev. 3.15—November 2009 AMD64 Technology
Software can interpret the data types in ways other than those shown in Figure 4-14 on page 122—
such as bit fields or fractional numbers—but the 128-bit media instructions do not directly support
such interpretations and software must handle them entirely on its own.
4.4.2 Operand Sizes and Overrides
Operand sizes for 128-bit media instructions are determined by instruction opcodes. Some of these
opcodes include an operand-size override prefix, but this prefix acts in a special way to modify the
opcode and is considered an integral part of the opcode. The general use of the 66h operand-size
override prefix described in “Instruction Prefixes” on page 71 does not apply to 128-bit media
instructions.
For details on the use of operand-size override prefixes in 128-bit media instructions, see the opcodes
in “128-Bit Media Instruction Reference” in Volume 4.
4.4.3 Operand Addressing
Depending on the 128-bit media instruction, referenced operands may be in registers or memory.
Register Operands. Most 128-bit media instructions can access source and destination operands in
XMM registers. A few of these instructions access the MMX registers, GPR registers, rFLAGS
register, or MXCSR register. The type of register addressed is specified in the instruction syntax.
When addressing GPR or XMM registers, the REX instruction prefix can be used to access the
extended GPR or XMM registers, as described in “Instruction Prefixes” on page 175.
Memory Operands. Most 128-bit media instructions can read memory for source operands, and
some of the instructions can write results to memory. “Memory Addressing” on page 14, describes the
general methods for addressing memory operands.
Immediate Operands. Immediate operands are used in certain data-conversion, vector-shift, and
vector-compare instructions. Such instructions take 8-bit immediates, which provide control for the
operation.
I/O Ports. I/O ports in the I/O address space cannot be directly addressed by 128-bit media
instructions, and although memory-mapped I/O ports can be addressed by such instructions, doing so
may produce unpredictable results, depending on the hardware implementation of the architecture.
4.4.4 Data Alignment
Generally, 128-bit media instructions that access a 128-bit operand in memory trigger a general-
protection exception (#GP) if the operand is not aligned to a 16-byte boundary. For instance, 128-bit
media instructions that manipulate scalar operands never trigger a #GP, nor do the following
instructions:
• MASKMOVDQU—Masked Move Double Quadword Unaligned.
• MOVDQU—Move Unaligned Double Quadword.
• MOVUPD—Move Unaligned Packed Double-Precision Floating-Point.