C.FSDSP

RISC-V C.FSDSP Instruction Details

Instruction ManualCSS-format

Store double FP to sp+offset. CSS format, RV32DC/RV64DC.

Instruction Syntax

c.fsdsp fs2, offset(sp)
Operand Breakdown
This is a CSS-format-format instruction. Confirm operand positions based on the assembly syntax.
CDCompressed Instruction

Instruction Behavior

c.fsdsp stores the 64-bit double-precision value from floating-point fs2 to sp plus a zero-extended offset scaled by 8.

C.FSDSP Decode & Execute Animation

Shows only manual-defined 16-bit fields, operands, and ISA-visible results; it does not model a pipeline, cache, timing, or an implementation's memory-fault handling.

c.fsdsp,(sp)
Execution context

The store transfers 64 bits; with a wider FLEN, FSW transfers the low 32 bits and ignores upper bits, while FSD transfers the low 64 bits. Transfers do not modify NaN payloads.

Naturally aligned accesses do not raise an address-misaligned exception; whether a misaligned access completes or raises an address-misaligned/access-fault exception is EEI-defined. This control displays only the selected outcome branch.

x2/sp = 0x0000000000001000; low 64 bits of f0 = 0x3FF0000000000000. -> 0x0000000000001010 -> M[0x0000000000001010] = 0x3FF0000000000000.
16-bit encoding fields
15..13
funct3
101
12..10
uimm[5:3]
010
9..7
uimm[8:6]
000
6..2
fs2
00000
1..0
op
10
Execution data path
x2/sp = 0x0000000000001000; low 64 bits of f0 = 0x3FF0000000000000.
0x0000000000001010 = 0x0000000000001000 + 16
M[0x0000000000001010] <- 0x3FF0000000000000
Architectural state has not been committed.

Quick Understanding & Search Notes

c.fsdsp stores the 64-bit double-precision value from floating-point fs2 to sp plus a zero-extended offset scaled by 8.

This is a real 16-bit C-extension memory encoding with semantics corresponding to the FLD/FLW/FSD/FSW floating-point load/store family.
The base is fixed to x2/sp; the source floating-point register field is not limited to f8..f15.
The offset is zero-extended and scaled by access width in the encoding; it is not an arbitrary byte immediate.

Common Usage Scenarios

Register Operations

Understand this scenario with real code like «c.fsdsp f0, 16(sp) # *(sp+16) = f0».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is CSS-format.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

The base is fixed to x2/sp; the source floating-point register field is not limited to f8..f15.
The offset is zero-extended and scaled by access width in the encoding; it is not an arbitrary byte immediate.

FAQ

What is the offset unit for c.fsdsp?

The encoded immediate is scaled by access width: 8 bytes for double-precision and 4 bytes for single-precision.

Does c.fsdsp require a floating-point extension?

Yes. Double-precision forms require D, single-precision forms require F, and all require C.