User Guide
General-Purpose Programming 87
24592—Rev. 3.15—November 2009 AMD64 Technology
• Faults—A fault is a precise exception that is reported on the boundary before the interrupted
instruction. Generally, faults are caused by an undesirable error condition involving the interrupted
instruction, although some faults (such as page faults) are common and normal occurrences. After
the service routine completes, the machine state prior to the faulting instruction is restored, and the
instruction is retried.
• Traps—A trap is a precise exception that is reported on the boundary following the interrupted
instruction. The instruction causing the exception finishes before the service routine is invoked.
Software interrupts and certain breakpoint exceptions used in debugging are traps.
• Aborts—Aborts are imprecise exceptions. The instruction causing the exception, and possibly an
indeterminate additional number of instructions, complete execution before the service routine is
invoked. Because they are imprecise, aborts typically do not allow reliable program restart.
Table 3-10 shows the interrupts and exceptions that can occur, together with their vector numbers,
mnemonics, source, and causes. For a detailed description of interrupts and exceptions, see
“Exceptions and Interrupts” in Volume 2.
Control transfers to interrupt handlers are similar to far calls, except that for the former, the rFLAGS
register is pushed onto the stack before the return address. Interrupts and exceptions to several of the
first 32 interrupts can also push an error code onto the stack. No parameters are passed by an interrupt.
As with CALLs, interrupts that cause a privilege change also perform a stack switch.
Table 3-10. Interrupts and Exceptions
Vector Interrupt (Exception) Mnemonic Source Cause
Generated
By General-
Purpose
Instructions
0 Divide-By-Zero-Error #DE Software DIV, IDIV instructions yes
1 Debug #DB Internal
Instruction accesses and
data accesses
yes
2 Non-Maskable-Interrupt NMI External External NMI signal no
3 Breakpoint #BP Software INT3 instruction yes
4 Overflow #OF Software INTO instruction yes
5 Bound-Range #BR Software BOUND instruction yes
6 Invalid-Opcode #UD Internal Invalid instructions yes
7 Device-Not-Available #NM Internal x87 instructions no
8 Double-Fault #DF Internal Interrupt during an interrupt yes
9
Coprocessor-Segment-
Overrun
— External Unsupported (reserved)
10 Invalid-TSS #TS Internal
Task-state segment access
and task switch
yes
11 Segment-Not-Present #NP Internal
Segment access through a
descriptor
yes