5 ms·
Thanks; that also explains why x86 would bother to champion specific NOP sequences specifically for NOP purposes.
by 082349872349872 4y ago
Thanks; that also explains why x86 would bother to champion specific NOP sequences specifically for NOP purposes.
- userbinator 4y agoThe official x86 NOP is at 90h (and actually originally meant "xchg ax, ax" --- https://news.ycombinator.com/item?id=10437070 https://news.ycombinator.com/item?id=10437070). All the other new sequences meant to be NOPs on older processors were allocated from the reserved space (e.g. segment override prefixes on intrasegment conditional jumps becoming branch hints on the P4.)
- monocasa 4y agoThere's actually several official nops on x86, each of different instruction length. To be fair, I think they back ported this behavior to the official arch after Microsoft relied on it. AMD defines up to 11 byte sequeces, Intel defines up to 9 byte sequences. 90 NOP 6690 66 NOP 0f1f00 NOP DWORD ptr [EAX] 0f1f4000 NOP DWORD ptr [EAX + 00H] 0f1f440000 NOP DWORD ptr [EAX + EAX*1 + 00H] 660f1f440000 66 NOP DWORD ptr [EAX + EAX*1 + 00H] 0f1f8000000000 NOP DWORD ptr [EAX + 00000000H] 0f1f840000000000 NOP DWORD ptr [EAX + EAX*1 + 00000000H] 660f1f840000000000 66 NOP DWORD ptr [EAX + EAX*1 + 00000000H] 66660f1f840000000000 66 66 NOP DWORD ptr [EAX + EAX*1 + 00000000H] 6666660f1f840000000000 66 66 66 NOP DWORD ptr [EAX + EAX*1 + 00000000H] https://stackoverflow.com/questions/25545470/long-multi-byte-nops-commonly-understood-macros-or-other-notation https://stackoverflow.com/questions/25545470/long-multi-byte...
- userbinator 4y agoThat's basically combinations of "regular NOP", "NOP with an ignored prefix", and "NOP with a ModRM". The regular one has been there since the 8086, the prefixed NOPs are 386+ (I believe on 8086 the 6x row aliases to 7x conditional jumps, and the 186 and 286 will cause a #UD exception), and the latter is P6+ but has a very interesting history: https://www.jookia.org/wiki/Nopl https://www.jookia.org/wiki/Nopl