Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z
Vol. 2B 4-381
INSTRUCTION SET REFERENCE, N-Z
UD2—Undefined Instruction
Description
Generates an invalid opcode. This instruction is provided for software testing to
explicitly generate an invalid opcode. The opcode for this instruction is reserved for
this purpose.
Other than raising the invalid opcode exception, this instruction is the same as the
NOP instruction.
This instruction’s operation is the same in non-64-bit modes and 64-bit mode.
Operation
#UD (* Generates invalid opcode exception *);
Flags Affected
None.
Exceptions (All Operating Modes)
#UD Instruction is guaranteed to raise an invalid opcode exception in
all operating modes.
Opcode Instruction 64-Bit Mode
Compat/
Leg Mode Description
0F 0B UD2 Valid Valid Raise invalid opcode exception.