4-13
PROCEDURE CALLS, INTERRUPTS, AND EXCEPTIONS
floating-point exception. Refer to Section 9.5.5., Exception Handling in Streaming SIMD
Extensions, in Chapter 9, Programming with the Streaming SIMD Extensions for more infor-
mation on handling STREAMING SIMD Extensions exceptions.
Note that because SIMD floating-point exceptions are precise and occur immediately, the situ-
ation does not arise where an x87-FP instruction, an FWAIT instruction, or another Streaming
SIMD Extensions instruction will catch a pending unmasked SIMD floating-point exception.
4.4.1.Call and Return Operation for Interrupt or Exception
Handling Procedures
A call to an interrupt or exception handler procedure is similar to a procedure call to another
protection level (refer to Section 4.3.6., CALL and RET Operation Between Privilege Levels).
Here, the interrupt vector references one of two kinds of gates: an interrupt gate or a trap gate.
Interrupt and trap gates are similar to call gates in that they provide the following information:
Access rights information.
The segment selector for the code segment that contains the handler procedure.
An offset into the code segment to the first instruction of the handler procedure.
The difference between an interrupt gate and a trap gate is as follows. If an interrupt or exception
handler is called through an interrupt gate, the processor clears the interrupt enable (IF) flag in
the EFLAGS register to prevent subsequent interrupts from interfering with the execution of the
handler. When a handler is called through a trap gate, the state of the IF flag is not changed.
If the code segment for the handler procedure has the same privilege level as the currently
executing program or task, the handler procedure uses the current stack; if the handler executes
at a more privileged level, the processor switches to the stack for the handlers privilege level.