c.addiw

C.ADDIW is an RV64C/RV128C-only instruction that performs the same computation as C.ADDI but produces a 32-bit result, then sign-extends result to 64 bits. C.ADDIW expands into `addiw xd, xd, imm`. The immediate can be zero for C.ADDIW, where this corresponds to `sext.w xd`. C.ADDIW is only valid when xd ≠ x0; the code points with xd=x0 are reserved.

Synopsis

c.addiw xd, imm

Encoding

Type:

012671112131501immxdimm001

RISC-V Instruction Encoder/Decoder

open c.addiw in rvcodecjs

Availability