Which extensions does C.SEXT.H require?
It is a Zcb instruction, and the manual lists Zbb as an additional prerequisite; Zcb itself depends on Zca.
16-bit sign-extend halfword (bit 15 replicated)
Extension condition: RV32/RV64 Zcb, requiring Zca and additionally Zbb.
C.SEXT.H uses the Zcb CU format. It sign-extends the least-significant halfword of rd'/rs1' to XLEN bits by copying halfword bit 15 into all upper bits. rd'/rs1' is limited to x8-x15, and Zbb is also required.
Shows only official 16-bit fields, operands, conditions, and architectural state; it does not model a pipeline, cache, or timing.
RV32/RV64 Zcb + Zca + Zbb
C.SEXT.H reads the low 16 bits of rd'/rs1', sign-extends using bit 15, and writes the XLEN-bit result back to that register.
RV32 Zcb+Zca+Zbb, x10=0x00008000: c.sext.h x10 writes x10=0xffff8000 (-32768). The RV64 result is 0xffffffffffff8000.
It is a Zcb instruction, and the manual lists Zbb as an additional prerequisite; Zcb itself depends on Zca.
Only the original low 16 bits of rd'/rs1' are used; bit 15 is copied into every higher bit and the result overwrites the same x8-x15 register.