What immediate range can SLLI encode?
As a shift amount, RV32 encodes 0..31 and RV64 encodes 0..63. It is not the ordinary -2048..2047 I-type arithmetic immediate.
Shift rs1 left logically by shamt bits (zeros into LSBs), result in rd
SLLI is the I-type immediate logical left-shift form. It shifts rs1 left by shamt, fills low bits with zero, discards overflowed high bits, and writes the XLEN-truncated result to rd. RV32 uses imm[4:0] as shamt, range 0..31; RV64 uses a 6-bit shamt with imm[5] in bit25, while the remaining high bits are fixed for legal shift-immediate encodings. opcode=0010011, funct3=001.
Starts with machine-code field decoding, then shows operand reads, instruction-specific execution, and ISA-visible state update.
This example uses fixed initial register values and PC=0x2000; instruction fetch succeeds, with no asynchronous interrupt or extra extension checks. Exception branches stop ordinary commit; post-trap PC and handler state are EEI-dependent.
The machine code is split by the current instruction format; the animation starts from encoding/decode.
This animation shows ISA-visible decode and state changes, not any specific CPU pipeline, cache, prediction, or timing implementation.
SLLI shifts rs1 left by the shamt constant in the syntax. It uses specialized shift-immediate encoding, not a normal signed imm[11:0] operand.
RV32I/RV64I, x6=20: slli x5, x6, 2 gives x5=80 (0x50); shamt is an encodable constant.
As a shift amount, RV32 encodes 0..31 and RV64 encodes 0..63. It is not the ordinary -2048..2047 I-type arithmetic immediate.
No. High bits shifted beyond XLEN are discarded, low bits are filled with zero, and rd receives only the XLEN-bit result.