C.LW
Compressed Load Word
C.LW rd', offset(rs1')
Loads a 32-bit word from memory using a compressed encoding.
Encoding
Binary Layout
?
31:16
010
15:13
c_uimm7hi
12:10
rs1_p
9:7
c_uimm7lo
6:5
rd_p
4:2
00
1:0
Operands
-
rd'
Dest (x8-x15) -
rs1'
Base (x8-x15) -
offset
Offset
Example
C.LW x8, 4(x9)
// 16-bit encoding of LW.
Related
More in C
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
Loads a 32-bit word from memory at a 6-bit unsigned offset from rs1′ into rd′.
Operation
R[rd'] = M[R[rs1'] + offset][31:0];