| |||

Home > NEON and VFP Programming > VFP instructions > VCVT (between floating-point and fixed-point) |

Convert between floating-point and fixed-point numbers.

`VCVT`

is always scalar.

`VCVT`

{}.`cond`

.F64`type`

`Dd,`

, #`Dd`

`fbits`

`VCVT`

{}.`cond`

.F32`type`

`Sd,`

, #`Sd`

`fbits`

`VCVT`

{}.F64.`cond`

`type`

`Dd,`

, #`Dd`

`fbits`

`VCVT`

{}.F32.`cond`

`type`

`Sd,`

, #`Sd`

`fbits`

where:

`cond`

is an optional condition code (see

*Condition codes*).`type`

can be any one of:

`S16`

16-bit signed fixed-point number

`U16`

16-bit unsigned fixed-point number

`S32`

32-bit signed fixed-point number

`U32`

32-bit unsigned fixed-point number.

`Sd`

is a single-precision register for the operand and result.

`Dd`

is a double-precision register for the operand and result.

`fbits`

is the number of fraction bits in the fixed-point number, in the range 0-16 if

is`type`

`S16`

or`U16`

, or in the range 1-32 if

is`type`

`S32`

or`U32`

.

The first two forms of this instruction convert from floating-point to fixed-point.

The third and fourth forms convert from fixed-point to floating-point.

In all cases the fixed-point number is contained in the least significant 16 or 32 bits of the register.