nop
NOP, short for No Operation, is an instruction used in many processor architectures that, by design, does nothing to the machine state other than advancing the program counter. In practice, executing a NOP has no effect on registers or memory and serves primarily as a time placeholder, a means to align code, or to reserve space for future changes.
In assembly language, NOPs are used to create deliberate timing delays, fill delay slots after branches, and
Implementation varies by architecture. Some CPUs provide a dedicated NOP instruction; others implement a harmless operation
- x86: a common single-byte NOP is 0x90; there are longer, multi-byte no-ops formed by sequences of
- ARM: a canonical NOP is MOV r0, r0 (in ARM mode), with Thumb-2 also providing dedicated NOP
- MIPS: NOP is commonly represented as sll $zero, $zero, 0, effectively a no-op.
- RISC-V: addi x0, x0, 0 is used as a NOP.
Pseudo-instructions and compilers: Many assemblers offer NOP as a pseudo-instruction. Optimizers and linkers may insert NOPs
Security note: In exploit development, the term NOP sled refers to a long sequence of NOP-like instructions