# `cvt.w.d`

[MIPS Documentation](https://asm-editor.specy.app/documentation/mips.md) › [Instructions](https://asm-editor.specy.app/documentation/mips/instruction.md)

Web page: https://asm-editor.specy.app/documentation/mips/instruction/cvt.w.d

**Convert double-precision to integer word**

Category: Floating point

Converts the double-precision float in the second register to a signed 32-bit integer by truncation and stores the result in the first.

## Forms

- `cvt.w.d $f1, $f2`

## Operands

- `$f1`: Any floating-point register, `$f0` to `$f31`.
- `$f2`: An even-numbered floating-point register, `$f0` to `$f30`. A double-precision value uses this register and the next odd-numbered register.

## Description

$f2 must be even-numbered. Use 'mfc1' to move the integer result to a general-purpose register.

## Example

```mips
.data
number: .double 2.0
.text
# Convert 2.0 to a word using the current rounding mode. Inspect $f8: raw word 2.
l.d $f2, number
cvt.w.d $f8, $f2
```
