# `movf`

[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/movf

**Move if FP condition false**

Category: Floating point

Copies the second register into the first if the FP condition flag (flag 0 by default) is false.

## Forms

- `movf $t1, $t2`

- `movf $t1, $t2, cc` · Copies $t2 into $t1 if FP condition flag N (specified by the third operand) is false (0). Allows results of multiple simultaneous FP comparisons to control integer register moves.

## Operands

- `$t1`: Any general-purpose register, `$0` to `$31`, using its numeric or named spelling, such as `$8` or `$t0` (`$zero` is `$0`; `$ra` is `$31`).
- `$t2`: A general-purpose register. It may be the same register as `$t1`.
- `cc`: A floating-point condition flag number, `0` to `7`. Comparisons set these flags; `bc1t` and `bc1f` test them.

## Description

Allows integer register updates to be conditioned on the result of a previous FP comparison (e.g., c.eq.s, c.lt.s).

## Example

```mips
.data
a: .float 1.0
b: .float 2.0
.text
# movf reads condition flag 0; set it false, then inspect $t2: 7 after the conditional copy.
l.s $f0, a
l.s $f2, b
c.lt.s $f2, $f0
li $t1, 7
li $t2, 0
movf $t2, $t1, 0
```
