c.ldsp

C.LDSP is an RV64C/RV128C-only instruction that loads a 64-bit value from memory into register xd. It computes its effective address by adding the zero-extended offset, scaled by 8, to the stack pointer, x2. It expands to `ld xd, offset(x2)`. C.LDSP is only valid when xd ≠ x0; code points with xd=x0 are reserved.

Synopsis

c.ldsp xd, imm(sp)

Encoding

Type:

01245671112131510immimmxdimm011

RISC-V Instruction Encoder/Decoder

open c.ldsp in rvcodecjs

Availability