ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

c.ldsp

T1 riscv alu insn
Load doubleword from stack pointer
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRV32/RV64 Zca, Zclsd
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Privilegeuser
ExtensionsZca, Zclsd

Summary

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.

Syntax / Encoding

c.ldsp xd, imm(sp) | 011xxxxxxxxxxx10 (mask=0xe003 match=0x6002)

Binary Encodings (2)

WidthFormatBit PatternMask / Match
16RV32011xxxxxxxxxxx100xe003 / 0x6002
16RV64011xxxxxxxxxxx100xe003 / 0x6002

Operands

NameDescription
immbits [4:2,12,6:5], shifted << 3
xdbits [11:7], not [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]

Reference Notes

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.