C.NOP

RISC-V C.NOP Instruction Details

Instruction ManualCI format

Fixed 16-bit no-operation. CI format; adjacent rd=x0, imm!=0 encodings are HINTs.

Instruction Syntax

c.nop
Operand Breakdown
This is a CI format-format instruction. Confirm operand positions based on the assembly syntax.
CCompressed Instruction

Instruction Behavior

C.NOP is the fixed CI-format encoding with rd=x0 and imm=0. It changes no user-visible state except advancing pc and incrementing applicable performance counters, and expands to nop. In the shared C.ADDI space, adjacent rd=x0, imm!=0 encodings are HINTs, not C.NOP.

C.NOP Decode And Execute Animation

Decodes the real 16-bit CR or CI encoding and distinguishes normal instructions, HINTs, and shared encodings.

Current Step

Step 1: identify the fixed C.NOP encoding

The animation shows C-extension 16-bit fields directly instead of pretending this is a 32-bit scalar instruction.

C.NOP has fixed CI encoding 0x0001: funct3=000, imm[5]=0, rd=x0, imm[4:0]=00000, op=01. It has no editable operands.
16-bit Encoding
0x0001 = 0000000000000001
funct3 [15..13]
000
imm[5] [12]
0
rd [11..7]
00000
imm[4:0] [6..2]
00000
op [1..0]
01
Operands And Calculation
funct3=000, imm[5:0]=000000, rd=x0, op=01
Fixed CI encoding; no general-register writeback.
pc ← pc + 2
Decoded Result And Architectural State
C.NOP

C.NOP changes no user-visible state except advancing pc and incrementing applicable performance counters.

This animation shows only officially defined decode, register reads, arithmetic, and architectural state, not a particular implementation's pipeline, cache, prediction, or timing.

Common Usage Scenarios

Address & Pointer

Understand this scenario with real code like «c.nop # 16-bit no-operation».

Cache & Hints

Understand this scenario with real code like «c.nop # 16-bit no-operation».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is CI format.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

imm!=0 encodes HINTs