-
Notifications
You must be signed in to change notification settings - Fork 98
UD — Undefined Instruction
Opcode | Instruction | Op/ En | 64-Bit Mode | Compat/ Leg Mode | Description |
0F FF | UD0 | ZO | Valid | Valid | Raise invalid opcode exception. |
0F B9 /r | UD1 r32, r/m32 | Valid | Raise invalid opcode exception. | ||
0F 0B | UD2 | ZO | Valid | Valid | Raise invalid opcode exception. |
Op/En | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
ZO | NA | NA | NA | NA |
RM | ModRM:reg (r) | ModRM:r/m (r) | NA | NA |
Generates an invalid opcode exception. This instruction is provided for software testing to explicitly generate an invalid opcode exception. The opcodes for this instruction are reserved for this purpose.
Other than raising the invalid opcode exception, this instruction has no effect on processor state or memory.
Even though it is the execution of the UD instruction that causes the invalid opcode exception, the instruction pointer saved by delivery of the exception references the UD instruction (and not the following instruction).
This instruction’s operation is the same in non-64-bit modes and 64-bit mode.
#UD (* Generates invalid opcode exception *);
None.
\#UD Raises an invalid opcode exception in all operating modes.
Source: Intel Architecture Software Developer's Manual (July 2017)