User Guide
64-Bit Media Programming 203
24592—Rev. 3.15—November 2009 AMD64 Technology
5.5.2 Operand Sizes and Overrides
Operand sizes for 64-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 64-bit media
instructions.
For details on the use of operand-size override prefixes in 64-bit media instructions, see the opcodes in
“64-Bit Media Instruction Reference” in Volume 5.
5.5.3 Operand Addressing
Depending on the 64-bit media instruction, referenced operands may be in registers or memory.
Register Operands. Most 64-bit media instructions can access source and destination operands
located in MMX registers. A few of these instructions access the XMM or GPR registers. When
addressing GPR or XMM registers in 64-bit mode, the REX instruction prefix can be used to access
the extended GPR or XMM registers, as described in “Instruction Prefixes” on page 228.
The 64-bit media instructions do not access the rFLAGS register, and none of the bits in that register
are affected by execution of the 64-bit media instructions.
Memory Operands. Most 64-bit media instructions can read memory for source operands, and a few
of the instructions can write results to memory. “Memory Addressing” on page 14, describes the
general methods and conditions for addressing memory operands.
Immediate Operands. Immediate operands are used in certain data-conversion and vector-shift
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 64-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. See
the data sheet or software-optimization documentation for particular hardware implementations.
5.5.4 Data Alignment
Those 64-bit media instructions that access a 128-bit operand in memory incur a general-protection
exception (#GP) if the operand is not aligned to a 16-byte boundary. These instructions include:
• CVTPD2PI—Convert Packed Double-Precision Floating-Point to Packed Doubleword Integers.
• CVTTPD2PI—Convert Packed Double-Precision Floating-Point to Packed Doubleword Integers,
Truncated.
• FXRSTOR—Restore XMM, MMX, and x87 State.
• FXSAVE—Save XMM, MMX, and x87 State.