User Guide
64-Bit Media Programming 229
24592—Rev. 3.15—November 2009 AMD64 Technology
5.9.1 Supported Prefixes
The following prefixes can be used with 64-bit media instructions:
• Address-Size Override—The 67h prefix affects only operands in memory. The prefix is ignored by
all other 64-bit media instructions.
• Operand-Size Override—The 66h prefix is used to form the opcodes of certain 64-bit media
instructions. The prefix is ignored by all other 64-bit media instructions.
• Segment Overrides—The 2Eh (CS), 36h (SS), 3Eh (DS), 26h (ES), 64h (FS), and 65h (GS)
prefixes affect only operands in memory. In 64-bit mode, the contents of the CS, DS, ES, SS
segment registers are ignored.
• REP—The F2 and F3h prefixes do not function as repeat prefixes for 64-bit media instructions.
Instead, they are used to form the opcodes of certain 64-bit media instructions. The prefixes are
ignored by all other 64-bit media instructions.
• REX—The REX prefixes affect operands that reference a GPR or XMM register when running in
64-bit mode. It allows access to the full 64-bit width of any of the 16 extended GPRs and to any of
the 16 extended XMM registers. The REX prefix also affects the FXSAVE and FXRSTOR
instructions, in which it selects between two types of 512-byte memory-image format, as described
in “Media and x87 Processor State” in Volume 2. The prefix is ignored by all other 64-bit media
instructions.
5.9.2 Special-Use and Reserved Prefixes
The following prefixes are used as opcode bytes in some 64-bit media instructions and are reserved in
all other 64-bit media instructions:
• Operand-Size Override—The 66h prefix.
• REP—The F2 and F3h prefixes.
5.9.3 Prefixes That Cause Exceptions
The following prefixes cause an exception:
• LOCK—The F0h prefix causes an invalid-opcode exception when used with 64-bit media
instructions.
5.10 Feature Detection
Before executing 64-bit media instructions, software should determine whether the processor supports
the technology by executing the CPUID instruction. “Feature Detection” on page 74 describes how
software uses the CPUID instruction to detect feature support. For full support of the 64-bit media
instructions documented here, the following features require detection:
• MMX instructions, indicated by bit 23 of CPUID function 1 and function 8000_0001h.
• 3DNow! instructions, indicated by bit 31 of CPUID function 8000_0001h.