Page 1 of 1

About the popad instructions

Posted: Sun Oct 02, 2011 11:16 am
by ppppllll1234
In "INTERRUPT AND EXCEPTION HANDLING" chapter of the Intel Pentium Programming manual,

A small subset of exceptions that are normally reported as faults are not
restartable and will result in loss of some processor state. An example,
executing a POPAD instruction where the stack frame crosses over the end of
the stack segment will cause such a fault to be reported. Here, the exception
handler will see that the instruction pointer (CS:EIP) has been restored as if
the POPAD instruction had not been executed; however, the internal
processor state (particularly, the general-purpose registers) will have been
modified. These corner cases are considered programming errors, and an
application causing this class of exceptions will likely be terminated by the
operating system.


I thnik that if POPAD occur a fault, the processor will restore general-purpose registers state to before this instruction executing.
why it's say the internal processor state have been modified?

Re: About the popad instructions

Posted: Sun Oct 02, 2011 2:29 pm
by Combuster
why it's say the internal processor state have been modified?
Because it does, end of story.