logoalt Hacker News

JoeAltmaieryesterday at 11:57 PM1 replyview on HN

There were several NOPs - XCHG BX,BX and so on. Those were taken later to be prefixes for new classes of opcodes.


Replies

bonzinitoday at 6:38 AM

None was. XCHG AX,AX is special because XCHG AX,reg has a one-byte encoding.

You're probably confusing with:

- POP CS being broken and later becoming a prefix

- some opcodes being "reserved NOPs", i.e. reserved without generating #UD. They are used for instructions that may be defined in the future while guaranteeing backwards compatibility, for example new kinds of prefetches. MPX bounds checking instructions were also encoded in reserved NOPs.