Hacker News new | ask | show | jobs
by starmole 1302 days ago
nop and enop and fnop! so many nops: https://www.felixcloutier.com/x86/nop
1 comments

Funny you mention nop. The classic nop is 0x90, which decodes to XCHG EAX, EAX, which, on x86_32, does nothing.

But x86_64 made 32-bit operations zero the high 32 bits of the destination register, so, logically, 0x90 would clear the high bits of RAX. Oops.

As I’ve heard the story, this was noticed a bit on the late side, and an 11th hour change was made to special case 0x90 and make it still be a nop.