Intel 253668-032US User Manual

Page of 806
Vol. 3   6-7
INTERRUPT AND EXCEPTION HANDLING
Aborts — An abort is an exception that does not always report the precise 
location of the instruction causing the exception and does not allow a restart of 
the program or task that caused the exception. Aborts are used to report severe 
errors, such as hardware errors and inconsistent or illegal values in system 
tables.
NOTE
One exception subset normally reported as a fault is not restartable. 
Such exceptions result in loss of some processor state. For example, 
executing a POPAD instruction where the stack frame crosses over 
the end of the stack segment causes a fault to be reported. In this 
situation, the exception handler sees that the instruction pointer 
(CS:EIP) has been restored as if the POPAD instruction had not been 
executed. However, internal processor state (the general-purpose 
registers) will have been modified. Such cases are considered 
programming errors. An application causing this class of exceptions 
should be terminated by the operating system.
6.6 
PROGRAM OR TASK RESTART
To allow the restarting of program or task following the handling of an exception or 
an interrupt, all exceptions (except aborts) are guaranteed to report exceptions on 
an instruction boundary. All interrupts are guaranteed to be taken on an instruction 
boundary.
For fault-class exceptions, the return instruction pointer (saved when the processor 
generates an exception) points to the faulting instruction. So, when a program or task 
is restarted following the handling of a fault, the faulting instruction is restarted (re-
executed). Restarting the faulting instruction is commonly used to handle exceptions 
that are generated when access to an operand is blocked. The most common example 
of this type of fault is a page-fault exception (#PF) that occurs when a program or 
task references an operand located on a page that is not in memory. When a page-
fault exception occurs, the exception handler can load the page into memory and 
resume execution of the program or task by restarting the faulting instruction. To 
insure that the restart is handled transparently to the currently executing program or 
task, the processor saves the necessary registers and stack pointers to allow a restart 
to the state prior to the execution of the faulting instruction.
For trap-class exceptions, the return instruction pointer points to the instruction 
following the trapping instruction. If a trap is detected during an instruction which 
transfers execution, the return instruction pointer reflects the transfer. For example, 
if a trap is detected while executing a JMP instruction, the return instruction pointer 
points to the destination of the JMP instruction, not to the next address past the JMP 
instruction. All trap exceptions allow program or task restart with no loss of conti-
nuity. For example, the overflow exception is a trap exception. Here, the return 
instruction pointer points to the instruction following the INTO instruction that tested