AMD amd64 architecture User Manual

Page of 336
128-Bit Media and Scientific Programming
177
24592—Rev. 3.15—November 2009
AMD64 Technology
See “Processor Feature Identification” in Volume 2 for a full description of the CPUID instruction and
its function codes.
In addition, the operating system must support the FXSAVE and FXRSTOR instructions (by having
set CR4.OSFXSR = 1), and it may wish to support SIMD floating-point exceptions (by having set
CR4.OSXMMEXCPT = 1). For details, see “System-Control Registers” in Volume 2.
4.10
Exceptions
Types of Exceptions.
128-bit media instructions can generate two types of exceptions:
General-Purpose Exceptions, described below in “General-Purpose Exceptions”
SIMD Floating-Point Exception, described below in “SIMD Floating-Point Exception Causes” on
page 178
Relation to x87 Exceptions.
Although the 128-bit media instructions and the x87 floating-point
instructions each have certain exceptions with the same names, the exception-reporting and exception-
handling methods used by the two instruction subsets are distinct and independent of each other. If
procedures using both types of instructions are run in the same operating environment, separate
services routines should be provided for the exceptions of each type of instruction subset.
4.10.1 General-Purpose Exceptions
The sections below list general-purpose exceptions generated and not generated by 128-bit media
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 andInterrupts” in Volume 2.
Exceptions Generated.
The 128-bit media instructions can generate the following general-purpose
exceptions:
#DB—Debug Exception (Vector 1)
#UD—Invalid-Opcode Exception (Vector 6)
#NM—Device-Not-Available Exception (Vector 7)
#DF—Double-Fault Exception (Vector 8)
#SS—Stack Exception (Vector 12)
#GP—General-Protection Exception (Vector 13)
#PF—Page-Fault Exception (Vector 14)
#MF—x87 Floating-Point Exception-Pending (Vector 16)
#AC—Alignment-Check Exception (Vector 17)
#MC—Machine-Check Exception (Vector 18)
#XF—SIMD Floating-Point Exception (Vector 19)