- Sources: post, HN discussion
- Summary: Raymond Chen reconstructs the name from Hyrum's Law: programs came to depend on
0F FF and 0F B9 raising invalid opcode exceptions, so Intel retroactively named those ud0 and ud1 and defined ud2 as the supported one. The operational detail is the decoding difference. ud0 and ud1 still decode a register-or-memory operand that the processor never uses, so an instruction whose decoding crosses into a not-present page raises an access violation rather than an invalid opcode exception, and some older processors faulted inconsistently at a page boundary. The post is labelled a reconstruction rather than documented history. - Why it matters: Code that emits a deliberate trap instruction gets a different exception from
ud0 and ud1 depending on where the operand bytes land, which is why ud2 is the one to emit.
send feedback on this story