Is it available on RV32?
No. SRLIW, SRLW, and SUBW are RV64I word-operation forms.
Subtract lower 32 bits of rs2 from rs1, producing 32-bit result sign-extended to 64 bits
SUBW (R-type, opcode=0111011, funct7=0100000, funct3=000) subtracts the lower 32 bits of rs2 from rs1, ignores overflow, sign-extends the 32-bit result to 64 bits, and writes it to rd. Unlike SUB on RV64 (full 64-bit operation), SUBW operates only on the lower 32 bits.
RV64I; XLEN=64; 32-bit result → sign extension
subw rd, rs1, rs2Assume successful instruction fetch, no asynchronous interrupt or extra extension checks; one initial value per register.
0x40C5853BDecode the current instruction fields and read sources before writeback; no result has been committed.
These are teaching steps for architectural effects, not processor pipeline stages or cycles.
SUBW is an RV64I W-suffix integer instruction: it uses the low 32 bits of its inputs, produces a 32-bit result, then sign-extends bit 31 to 64 bits.
RV64I, x11=0x80000000 and x12=1: subw x10, x11, x12 yields 0x000000007fffffff, ignoring overflow and sign-extending the low 32-bit difference.
No. SRLIW, SRLW, and SUBW are RV64I word-operation forms.
SUBW ignores overflow: it retains the low 32 bits of the difference, then sign-extends that 32-bit result to 64 bits.