c.lwsp

Loads a 32-bit value from memory into register xd. It computes an effective address by adding the zero-extended offset, scaled by 4, to the stack pointer, x2. It expands to `lw` `xd, offset(x2)`. C.LWSP is only valid when xd ≠ x0. The code points with xd=x0 are reserved.

Synopsis

c.lwsp xd, imm(sp)

Encoding

Type:

01234671112131510immimmxdimm010

RISC-V Instruction Encoder/Decoder

open c.lwsp in rvcodecjs

Availability