# `movt.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/movt.d

**Move double-precision if FP condition true**

Category: Floating point

Copies the double-precision value in the second register into the first if the FP condition flag (flag 0 by default) is true.

## Forms

- `movt.d $f2, $f4`

- `movt.d $f2, $f4, cc` · Copies the double-precision value in $f4 into $f2 if FP condition flag N (specified by the immediate) is true (1). Both register numbers must be even.

## Operands

- `$f2`: An even-numbered floating-point register, `$f0` to `$f30`. A double-precision value uses this register and the next odd-numbered register.
- `$f4`: An even-numbered floating-point register holding a double. It may be the same register as `$f2`.
- `cc`: A floating-point condition flag number, `0` to `7`. Comparisons set these flags; `bc1t` and `bc1f` test them.

## Description

Both register numbers must be even.

## Example

```mips
.data
a: .float 1.0
b: .float 2.0
value: .double 2.0
.text
# movt.d copies only when condition flag 0 is true. Inspect $f6:$f7 receive 2.0 (raw bits 0x4000000000000000).
l.s $f0, a
l.s $f2, b
c.lt.s $f0, $f2
l.d $f4, value
movt.d $f6, $f4, 0
```
