stui
Set User Interrupt Flag
STUI
Sets the User Interrupt Flag (UIF).
Details
Sets the User Interrupt Flag (UIF) in the UINTR register, enabling delivery of user-level interrupts to the current process. This is a privileged-equivalent instruction that requires the UINTR CPU feature and operates only in user mode; it modifies no standard CPU flags. Execution in a context where UINTR is unavailable causes a #UD exception.
Pseudocode Operation
UINTR.UIF ← 1
Example
STUI
Encoding
Binary Layout
F3
+0
0F
+1
01
+2
EF
+3
Operands
Reference (Intel® SDM)
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| F3 0F 01 EF | STUI | ZO | V/I | UINTR | Set user interrupt flag. |
Description
STUI sets the user interrupt flag (UIF). Its effect takes place immediately; a user interrupt may be delivered on the instruction boundary following STUI. (This is in contrast with STI, whose effect is delayed by one instruction).
An execution of STUI inside a transactional region causes a transactional abort; the abort loads EAX as it would have had it been due to an execution of STI.
Operation
UIF := 1;
Flags Affected
None.
Exceptions
Protected Mode Exceptions
#UD The STUI instruction is not recognized in protected mode.
Real-Address Mode Exceptions
#UD The STUI instruction is not recognized in real-address mode.
Virtual-8086 Mode Exceptions
#UD The STUI instruction is not recognized in virtual-8086 mode.
Compatibility Mode Exceptions
#UD The STUI instruction is not recognized in compatibility mode.
64-Bit Mode Exceptions
#UD If the LOCK prefix is used.
If executed inside an enclave.
If CR4.UINTR = 0.
If CPUID.07H.00H:EDX.UINTR[5] = 0.
STUI—Set User Interrupt Flag Vol. 2B 4-683