If protected-mode virtual interrupts are not enabled, CLI clears the IF flag in the EFLAGS register. No other flags are affected. Clearing the IF flag causes the processor to ignore maskable external interrupts. The IF flag and the CLI and STI instruction have no affect on the generation of exceptions and NMI interrupts.
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.
The following table indicates the action of the CLI instruction depending on the processor operating mode and the CPL/IOPL of the running program or procedure.
Decision Table for CLI Results:
PE | VM | IOPL | CPL | PVI | VIP | VME | CLI Result |
0 | X | X | X | X | X | X | IF = 0 |
1 | 0 | >= CPL | X | X | X | X | IF = 0 |
1 | 0 | < CPL | 3 | 1 | X | X | VIF = 0 |
1 | 0 | < CPL | < 3 | X | X | X | GP Fault |
1 | 0 | < CPL | X | 0 | X | X | GP Fault |
1 | 1 | 3 | X | X | X | X | IF = 0 |
1 | 1 | < 3 | X | X | X | 1 | VIF = 0 |
1 | 1 | < 3 | X | X | X | 0 | GP Fault |
X = This setting has no impact. |
|