Is it available on RV32?
No. SRLIW, SRLW, and SUBW are RV64I word-operation forms.
Shift lower 32 bits of rs1 right logically by rs2[4:0], sign-extend 32-bit result to 64 bits
SRLW (R-type, opcode=0111011, funct7=0000000, funct3=101) performs a logical right shift on the lower 32 bits of rs1 (zeros shifted into upper bits) by the shift amount in rs2[4:0]. The 32-bit result is sign-extended to 64 bits.
RV64I; XLEN=64; 32-bit result → sign extension
srlw rd, rs1, rs2Assume successful instruction fetch, no asynchronous interrupt or extra extension checks; one initial value per register.
This example fixes IALIGN=32 and a 32-bit instruction; PC must be 4-byte aligned.
0x00C5D53BDecode 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.
SRLW is RV64I-only: logically shift rs1[31:0] by rs2[4:0], then sign-extend bit 31 of the 32-bit result to 64 bits.
RV64I, x11=0x1234567880000000 and x12=32: srlw x10, x11, x12 uses shift amount 0 and yields 0xffffffff80000000, ignoring the upper 32 bits of rs1.
No. SRLIW, SRLW, and SUBW are RV64I word-operation forms.
The logical shift forms a 32-bit result first; the W-instruction rule then sign-extends bit 31 to 64 bits.