C.NOP

RISC-V C.NOP Instruction Details

Instruction ManualC-type

16-bit no-op. imm!=0 encodes HINTs. CI format.

Instruction Syntax

c.nop
Operand Breakdown
Compressed instructions are 16 bits; registers are often limited to x8–x15.
Immediate fields are narrower. Refer to the full encoding for this compressed instruction.
CCompressed Instruction

Instruction Behavior

C.NOP (CI format) changes no user-visible state, only advances pc. Expands to nop. C.NOP with imm≠0 are HINTs. C.NOP is effectively C.ADDI with rd=x0 and imm=0.

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 C-type.
  • 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