# `fcvt.s.d`

[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/fcvt.s.d

**Convert a double to a float**

Category: Floating point

Converts the double-precision value in the second register to single precision and stores it in the first.

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

## Forms

- `fcvt.s.d f1, f2, rm`

## 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.

- `fcvt.s.d f1, f2`
  - `fcvt.s.d f1, f2` → `fcvt.s.d f1, f2, dyn`

## Operands

- `f1`: Any floating-point register, `f0` to `f31`, or its named alias, such as `ft0`, `fa0` or `ft11`.
- `f2`: A floating-point register. It may be the same register as `f1`.
- `rm`: A rounding mode: `rne` (nearest, ties to even), `rtz` (toward zero), `rdn` (toward negative infinity), `rup` (toward positive infinity), `rmm` (nearest, ties away from zero) or `dyn` (use the rounding mode in `fcsr`).

## Example

```riscv
# Convert the value 6.0 from d to s; f2 (ft2) holds 6.0.
.text
li t0, 6
fcvt.d.w f1, t0
fcvt.s.d f2, f1
```
