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.
Subtract rs2' from rd', write to rd'. CA format.
C.SUB (CA format, x8-x15 only) computes subtraction of rd' and rs2', writes to rd'. Expands to sub rd',rd',rs2'.
Shows only official 16-bit fields, conditions, and architectural state; it does not model a pipeline, cache, or timing.
C.SUB subtracts rs2' from rd' and writes rd'. Both CA compact-register fields select only x8-x15.
Understand this scenario with real code like «c.sub x8, x9 # x8 -= x9».
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.