c.addi16sp

C.ADDI16SP adds the non-zero sign-extended 6-bit immediate to the value in the stack pointer (sp=x2), where the immediate is scaled to represent multiples of 16 in the range (-512,496). C.ADDI16SP is used to adjust the stack pointer in procedure prologues and epilogues. It expands into `addi x2, x2, nzimm[9:4]`. C.ADDI16SP is only valid when nzimm ≠ 0; the code point with nzimm=0 is reserved.

Synopsis

c.addi16sp sp, imm

Encoding

Type:

012345671112131501immimmimmimm00010imm011

RISC-V Instruction Encoder/Decoder

open c.addi16sp in rvcodecjs

Availability