Does NOP have a separate real-instruction encoding?
nop is an assembler pseudo-instruction. Its canonical encoding reuses ADDI x0, x0, 0, with no separate opcode.
nop is a nullary assembler pseudo-instruction with canonical 32-bit encoding ADDI x0, x0, 0 (0x00000013).
nopWrite nop with no explicit register or immediate operands; its canonical expansion is addi x0, x0, 0.
This page preserves the /instructions/nop entry and explains the assembler spelling and canonical base-instruction encoding. nop expands to ADDI x0, x0, 0, using the RV32I/RV64I I-type encoding; it has no separate opcode. Executing this canonical 32-bit encoding changes no architecturally visible state except advancing the PC by 4 bytes and incrementing applicable performance counters.
Canonical 32-bit I-type fields: imm[11:0]=000000000000, rs1=00000, funct3=000, rd=00000, opcode=0010011. Together they give 0x00000013.
RV32I/RV64I: successful execution of this canonical encoding at PC=0x1000 gives PC=0x1004, unchanged general registers and memory, and applicable performance-counter increments.
nop
# canonical base instruction: addi x0, x0, 0
# 32-bit encoding: 0x00000013View The ADDI Base Encoding In EncoderThe canonical NOP encoding is ADDI x0, x0, 0. Other encodings that leave architectural state unchanged are available as HINTs; they are not all the canonical NOP encoding.
NOP does not imply a fixed cycle count or fixed pipeline-resource consumption; the specification allows microarchitectural optimization.
x0 is always zero. This canonical encoding leaves general registers and memory unchanged, while the PC and applicable performance counters still advance.
nop is an assembler pseudo-instruction. Its canonical encoding reuses ADDI x0, x0, 0, with no separate opcode.
It changes no architecturally visible state except advancing the PC and incrementing applicable performance counters. The canonical 32-bit encoding advances the PC by 4 bytes.
A canonical encoding permits microarchitectural optimization and more readable disassembly output. Other NOP encodings are available for HINTs.