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 6-bit imm scaled by 16 to sp. CI format; shares opcode with C.LUI.
C.ADDI16SP is the stack-pointer form of C.ADDI. It adds a nonzero signed immediate, encoded in 16-byte scaled form, to x2/sp. The effective immediate range is -512 to +496, and nzimm must not be zero.
C.ADDI16SP is the 16-bit encoding form for compressed add immediate to sp; its semantics and encodable register/immediate ranges must be read from the official C extension rules.
Understand this scenario with real code like «c.addi16sp -32 # sp -= 32».
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.