User Guide
230 64-Bit Media Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
• MMX extensions, indicated by bit 22 of CPUID function 8000_0001h.
• 3DNow! extensions, indicated by bit 30 of CPUID function 8000_0001h.
• SSE instructions, indicated by bit 25 of CPUID function 8000_0001h.
• SSE2 instruction extensions, indicated by bit 26 of CPUID function 8000_0001h.
• SSE3 instruction extensions, indicated by bit 0 of CPUID function 0000_0001h.
• SSE4A instruction extensions, indicated by bit 6 of CPUID function 8000_0001h.
Software may also wish to check for the following support, because the FXSAVE and FXRSTOR
instructions execute faster than FSAVE and FRSTOR:
• FXSAVE and FXRSTOR, indicated by bit 24 of CPUID function 1 and function 8000_0001h.
Software that runs in long mode should also check for the following support:
• Long Mode, indicated by bit 29 of CPUID function 8000_0001h.
See “Processor Feature Identification” in Volume 2 for a full description of the CPUID instruction and
its function codes.
If the FXSAVE and FXRSTOR instructions are to be used, the operating system must support these
instructions by having set CR4.OSFXSR = 1. If the MMX floating-point-to-integer data-conversion
instructions (CVTPS2PI, CVTTPS2PI, CVTPD2PI, or CVTTPD2PI) are used, the operating system
must support the FXSAVE and FXRSTOR instructions and SIMD floating-point exceptions (by
having set CR4.OSXMMEXCPT = 1). For details, see “System-Control Registers” in Volume 2.
5.11 Exceptions
64-bit media instructions can generate two types of exceptions:
• General-Purpose Exceptions, described below in “General-Purpose Exceptions”
• x87 Floating-Point Exceptions (#MF), described in “x87 Floating-Point Exceptions (#MF)” on
page 231
All exceptions that occur while executing 64-bit media instructions can be handled by legacy
exception handlers used for general-purpose instructions and x87 floating-point instructions.
5.11.1 General-Purpose Exceptions
The sections below list exceptions generated and not generated by general-purpose instructions. For a
summary of the general-purpose exception mechanism, see “Interrupts and Exceptions” on page 86.
For details about each exception and its potential causes, see “Exceptions and Interrupts” in Volume 2.
Exceptions Generated. The 64-bit media instructions can generate the following general-purpose
exceptions:
• #DB—Debug Exception (Vector 1)