# `fld`

[RISC-V Documentation](https://asm-editor.specy.app/documentation/risc-v.md) › [Instructions](https://asm-editor.specy.app/documentation/risc-v/instruction.md)

Web page: https://asm-editor.specy.app/documentation/risc-v/instruction/fld

**Load a double from memory**

Category: Floating point

Loads a double-precision value from the address in the second register plus an offset into the first.

[RISC-V manual: fld](https://docs.riscv.org/reference/isa/v20260120/unpriv/d-st-ext.html#norm:fld_op)

Used in: [Floating point and the F and D extensions](https://asm-editor.specy.app/learn/courses/risc-v/think-in-assembly/floating-point-and-the-f-and-d-extensions.md) (RISC-V assembly)

## Forms

- `fld f1, imm12(t1)`

## Pseudo-instructions

The processor does not have these forms. The assembler replaces each of them with one or more real instructions. Open a row to see them.

Set f1 to 64-bit value from effective memory word address

- `fld f1, (t2)`
  - `fld f1,(t2)` → `fld f1, 0(t2)`
- `fld f1, imm12`
  - `fld f1,-100` → `fld f1, imm12(zero)`

Set f1 to 64-bit value from effective memory word address using t3 as a temporary

- `fld f1, imm32, t3`
  - `fld f1,10000000,t3` → `lui t3, hi(imm32)`; `fld f1, lo(imm32)(t3)`
- `fld f1, label, t3`
  - `fld f1,label, t3` → `auipc t3, pcrel_hi(label)`; `fld f1, pcrel_lo(label)(t3)`

- `fld f1, %lo(label)(t2)` · Load from Address
  - `fld f1,%lo(label)(t2)` → `fld f1, lo(label)(t2)`

## Operands

- `f1`: Any floating-point register, `f0` to `f31`, or its named alias, such as `ft0`, `fa0` or `ft11`.
- `imm12`: A signed 12-bit immediate, `-2048` to `2047`.
- `t1`: Any integer register, `x0` to `x31`, or its named alias, such as `zero`, `t0` or `t6`.
- `t2`: An integer register. It may be the same register as `t1`.
- `imm32`: A 32-bit immediate, `-2147483648` to `4294967295`.
- `t3`: An integer register. It may be the same register as `t1`.
- `label`: A named address in the program, such as the start of a loop or a variable in `.data`.

## Example

```riscv
# value contains 1.5; fld loads that value into f1 (ft1).
.data
value: .double 1.5
.text
la t0, value
fld f1, 0(t0)
```
