C.SLLI

Compressed Shift Left Logical Immediate

C.SLLI rd, imm

Logically shifts a register left by immediate.

Encoding

Binary Layout
?
31:16
000
15:13
c_nzuimm6hi
12
rd_rs1_n0
11:7
c_nzuimm6lo
6:2
10
1:0
 
Format CI
Opcode 0x00000002
Extension C

Operands

  • rd
    Dest/Source
  • imm
    Shift Amount

Example

C.SLLI x10, 2

// x10 = x10 << 2

Related

More in C

Description

Logical left shift of rd (≠ x0) by a 5-bit (RV32) or 6-bit (RV64) immediate.

Operation

R[rd] = R[rd] << imm;