SLLIW
Shift Left Logical Immediate Word
SLLIW rd, rs1, shamt
Shifts the lower 32 bits of rs1 left by a constant, sign-extending the result.
Details
SLLIW performs a logical left shift of the lower 32 bits of rs1 by the 5-bit immediate, sign-extends the 32-bit result to 64 bits, and writes it to rd.
Pseudocode Operation
R[rd] = sext((R[rs1] << shamt)[31:0]);
Example
SLLIW x10, x11, 4
Encoding
Binary Layout
0000000
31:25
shamt
24:20
rs1
19:15
001
14:12
rd
11:7
0011011
6:0
Operands
-
rd
Destination register (integer) -
rs1
Source -
shamt
Shift Amount (0-31)