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.
Logical right shift of rd'. CB format.
C.SRLI (CB format, rd' x8-x15 only) shifts rd' right logically by shamt. Expands to srli rd',rd',shamt. In RV32C, shamt[5] must be 0. HINT when shamt=0.
Shows only official 16-bit fields, conditions, and architectural state; it does not model a pipeline, cache, or timing.
C.SRLI logically shifts rd' in x8-x15 right by shamt and writes the same register; shamt=0 is a HINT.
Understand this scenario with real code like «c.srli x8, 2 # x8 >>= 2 (logical)».
Understand this scenario with real code like «c.srli x8, 2 # x8 >>= 2 (logical)».
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.