Intel 253666-024US User Manual
Page 157

Vol. 2A 3-111
INSTRUCTION SET REFERENCE, A-M
CLI — Clear Interrupt Flag
THEN
IF IOPL
←
CPL
THEN
IF
←
0; (* Reset Interrupt Flag *)
ELSE
IF ((IOPL
<
CPL) and (CPL = 3) and (PVI
=
1))
THEN
VIF
←
0; (* Reset Virtual Interrupt Flag *)
ELSE
#GP(0);
FI;
FI;
ELSE (* VM = 1 *)
IF IOPL
=
3
THEN
IF
←
0; (* Reset Interrupt Flag *)
ELSE
IF (IOPL
<
3) AND (VME
=
1)
THEN
VIF
←
0; (* Reset Virtual Interrupt Flag *)
ELSE
#GP(0);
FI;
FI;
FI;
FI;
Flags Affected
If protected-mode virtual interrupts are not enabled, IF is set to 0 if the CPL is equal
to or less than the IOPL; otherwise, it is not affected. The other flags in the EFLAGS
register are unaffected.
When protected-mode virtual interrupts are enabled, CPL is 3, and IOPL is less than
3; CLI clears the VIF flag in the EFLAGS register, leaving IF unaffected.
Protected Mode Exceptions
#GP(0)
If the CPL is greater (has less privilege) than the IOPL of the
current program or procedure.
#UD
If the LOCK prefix is used.
Real-Address Mode Exceptions
#UD
If the LOCK prefix is used.