TESTUI

Determine User Interrupt Flag

Opcode/InstructionOp/En64/32 bit Mode SupportCPUID Feature FlagDescription
F3 0F 01 ED TESTUIZOV/IUINTRCopies the current value of UIF into EFLAGS.CF.

Instruction Operand Encoding

Op/EnTupleOperand 1Operand 2Operand 3Operand 4
ZON/AN/AN/AN/AN/A

TESTUI copies the current value of the user interrupt flag (UIF) into EFLAGS.CF. This instruction can be executed regardless of CPL.

TESTUI may be executed normally inside a transactional region.

Operation

CF := UIF;
ZF := AF := OF := PF := SF := 0;

Flags Affected

The ZF, OF, AF, PF, SF flags are cleared and the CF flags to the value of the user interrupt flag.

Protected Mode Exceptions

#​​​UDThe TESTUI instruction is not recognized in protected mode.

Real-Address Mode Exceptions

#​​​UDThe TESTUI instruction is not recognized in real-address mode.

Virtual-8086 Mode Exceptions

#​​​UDThe TESTUI instruction is not recognized in virtual-8086 mode.

Compatibility Mode Exceptions

#​​​UDThe TESTUI instruction is not recognized in compatibility mode.

64-Bit Mode Exceptions

#​​​UDIf the LOCK prefix is used.
If executed inside an enclave.
If CR4.UINTR = 0.
If CPUID.07H.0H:EDX.UINTR[bit 5] = 0.

This UNOFFICIAL, mechanically-separated, non-verified reference is provided for convenience, but it may be incomplete or broken in various obvious or non-obvious ways. Refer to Intel® 64 and IA-32 Architectures Software Developer’s Manual for anything serious.