Vector Floating-point Programming
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All r ights reserved. 6-37
6.7.18 FTOSI and FTOUI
Convert floating-point to signed integer and floating-point to unsigned integer.
FTOSI
and
FTOUI
are always scalar.
Syntax
FTOSI{Z}<precision>{cond} Sd, Fm
FTOUI{Z}<precision>{cond} Sd, Fm
where:
Z
is an optional parameter specifying rounding towards zero. If specified,
this overrides the rounding mode currently specified in the FPSCR. The
FPSCR is not altered.
<precision>
must be either
S
for single-precision, or
D
for double-precision.
cond
is an optional condition code (see VFP and condition codes on page6-8).
Sd
is a single-precision VFP register for the integer result.
Fm
is a VFP register holding the operand. The precision of
Fm
must match the
precision specified in
<precision>
.
Usage
The
FTOSI
instruction converts the floating-point value in
Fm
to a signed integer and
places the result in
Sd
.
The
FTOUI
instruction converts the floating-point value in
Fm
to an unsigned integer and
places the result in
Sd
.
Exceptions
FTOSI
and
FTOUI
instructions can produce Invalid Operation or Inexact exceptions.
Examples
FTOSID s10, d2
FTOUID s3, d1
FTOSIZS s3, s31