Is it always equivalent to a same-named 32-bit instruction?
Not always. Some C/Zc instructions compress common 32-bit operations, while others have dedicated stack-frame or table-jump semantics.
Add sign-extended 6-bit imm to rd; 32-bit result sign-extended. CI format, RV64C.
C.ADDIW (CI format, RV64 only) adds sign-extended 6-bit immediate to rd, sign-extends lower 32 bits to 64 bits. Expands to addiw rd,rd,imm. imm=0 is equivalent to sext.w rd. Valid only when rd≠x0.
C.ADDIW is the 16-bit encoding form for compressed ADDIW; its semantics and encodable register/immediate ranges must be read from the official C extension rules.
Understand this scenario with real code like «c.addiw x10, 5 # x10 = sext_w(x10+5)».
Not always. Some C/Zc instructions compress common 32-bit operations, while others have dedicated stack-frame or table-jump semantics.
Many 16-bit encodings can represent only a compressed register subset or fixed registers such as sp, ra, a0/a1.