c.fsdsp
Store double-precision value to stack
- Extension
- D, C
- XLEN
- RV32 and RV64
- Assembly (riscv-unified-db)
c.fsdsp fs2, imm(sp)- Length
- 16-bit (compressed)
Encoding
| 1513 | 127 | 62 | 10 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 101 | uimm[5:3|8:6] | rs2 | 10 | ||||||||||||
Match 0xa002, mask 0xe003. Source: c.fsdsp c_rs2 c_uimm9sp_s 1..0=2 15..13=5 in riscv-opcodes/extensions/rv_c_d.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| uimm[5:3|8:6] | 12:7 | c_uimm9sp_s |
| rs2 | 6:2 | c_rs2 |
Description
Stores a double-precision floating-point value in floating-point register fs2 to memory.
It computes an effective address by adding the zero-extended offset, scaled by 8,
to the stack pointer, x2.
It expands to fsd fs2, offset(x2).
Description from riscv-unified-db, reformatted.
Operation
if (implemented?(ExtensionName::C) && MISA_CSR_IMPLEMENTED && (CSR[misa].C == 1'b0)) {
reserved_instruction($encoding);
}
if (implemented?(ExtensionName::D) && MISA_CSR_IMPLEMENTED && (CSR[misa].D == 1'b0)) {
reserved_instruction($encoding);
}
XReg virtual_address = X[2] + imm;
write_memory(64, virtual_address, F[fs2][63:0], $encoding);Pseudocode in riscv-unified-db’s IDL, quoted unchanged.