Instruction
CLUI
Clears the user interrupt flag (UIF), holding user interrupts back from the next instruction on.
- Extensions
- Forms
- 1 (1 Legacy)
- Data
- Intel XED v2026.08.23
CLUI clears the user-interrupt flag, UIF, and holds back user interrupts from the next instruction boundary on: unlike CLI, it needs no privilege, so a program can protect its own critical sections from its own user-interrupt handler, the way a kernel does with IF. STUI sets the flag again and TESTUI reads it.
What a held interrupt does
CLUI does not discard anything. A user interrupt that arrives while UIF is clear stays recorded as a request, and requests posted for the thread by SENDUIPI keep accumulating, one bit per vector; once UIF is set again, the processor delivers the highest pending vector at the next instruction boundary. Several requests with the same vector merge into one bit, so a handler cannot count deliveries to count events.
Delivery itself clears UIF before the handler’s first instruction, so a handler does not need a CLUI to keep from being interrupted by the next user interrupt.
In compiled code
GCC 14 and Clang 23 with -muintr at -O2 compile _clui() to clui. A
section that must work whether or not user interrupts were enabled on
entry reads the flag with _testui() first and sets it again only if it
was set; both compilers made TESTUI, a SETcc of CF, CLUI, the protected
code and a test that branches around the STUI.
Where it runs
CLUI exists only in 64-bit mode, needs UINTR (CPUID leaf 7, EDX bit 5) and CR4.UINTR, and raises #UD otherwise, inside an enclave or with a LOCK prefix; in a TSX transaction it aborts the transaction as CLI would. Its bytes, F3 0F 01 EE, are those of RDPKRU with an F3 prefix; the probe does not run them, as the Operation section says, so the site has no Zen 5 result for CLUI.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
CLUI 64-bit mode only
CLUI | F3 0F 01 EE | UINTR |
Latency and throughput
| Model | CLUI |
|---|---|
| Sapphire Rapids | 100 / 0.25p0156 |
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
if not cr4 >> 25 & 1: # CR4.UINTR; clear without UINTR
fault(UD)
uif = 0 # at once: no user interrupt is
# delivered after it
Not run on a processor: its bytes are RDPKRU's with an F3 prefix, which a processor without UINTR may run as RDPKRU, so that a case would not record CLUI; and no processor at hand has UINTR.
Operands
| Operand | Kind | Action |
|---|---|---|
CLUI 64-bit mode only | ||
UIF | implicit | write |
Flags
None: XED records no flag that the forms test or change.
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to CLUI, each with the form it compiles to and the Clang options it needs. The forms come from compiling every intrinsic and decoding the result with Intel XED; all intrinsics A–Z explains the method.
| Intrinsic | Compiles to |
|---|---|
_clui
void _clui(void) |
|
CPUID and processors
Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.
| ISA set | CPUID | Processors |
|---|---|---|
UINTR | UINTR | Arrow Lake, Panther Lake, Nova Lake, Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Sierra Forest, Clearwater Forest |
More UINTR instructions
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - Clang's x86 intrinsic headers, LLVM 23.1.2 (commit
85ac56026243): the intrinsics, their signatures and doc comments, and the Clang of that release, which compiled each of them. - LLVM 23.1.2's x86 scheduling models (commit
85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2A, page 3-153 (CLUI)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3 (325384-093, September 2026)
The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The intrinsics and their signatures come from Clang and the timings from LLVM's scheduling models, both part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.