3 ms·
As specified by the spec, it arguably increments RIP by one. The actual typical hardware implementation just fetches the next 16-32 bytes from icache, shifts i
by phire 2mo ago
As specified by the spec, it arguably increments RIP by one.
The actual typical hardware implementation just fetches the next 16-32 bytes from icache, shifts it to the correct alignment, and slams it into a bunch of parallel decoders which each attempts to decode one x86 instruction per byte.
The next cycle, the first 1-6 non-overlapping valid instructions are accepted into a queue for further decoding. The NOP almost certainly takes up space in this queue.
At no point does RIP get incremented by one. There isn't even a single physical RIP register to increment, the CPU is "executing" dozens or even hundreds of RIPs in parallel.
- amluto 2mo agoAs long as everyone is being outrageous pedantic: NOP, like all other non-faulting, non-control-transferring instructions, increments RIP by the length of the instruction, which may or may not be one. A prefixed NOP is still NOP.