EasyManua.ls Logo

Infineon TriCore TC1.6P - FTOI - Float to Integer

Infineon TriCore TC1.6P
484 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
TriCore
®
TC1.6P & TC1.6E
32-bit Unified Processor Core
Instruction Set
V1.0 2013-07
User Manual (Volume 2) 3-403
FTOI
Float to Integer
Description
Converts the contents of data register D[a] from floating-point format to a 32-bit two’s complement signed integer
format. The rounded result is put in data register D[c]. The rounding mode used for the conversion is defined by
the PSW.RM field.
FTOID[c], D[a] (RR)
if(is_nan(D[a])) then result = 0;
else if(f_real(D[a]) > 2
31
-1) then result = 7FFFFFFF
H
;
else if(f_real(D[a]) < -2
31
) then result = 80000000
H
;
else result = round_to_integer(D[a], PSW.RM);
D[c] = result[31:0];
Exception Flags
Examples
ftoi d2, d1
See Also
ITOF, FTOIZ
FS if(set_FI OR set_FX) then PSW.FS = 1 else PSW.FS = 0;
FI if((f_real(D[a]) > 2
31
-1) OR (f_real(D[a]) < -2
31
) OR is_nan(D[a])) then set_FI = 1 else set_FI = 0;
if(set_FI) then PSW.FI = 1;
FV Not set by this instruction.
FZ Not set by this instruction.
FU Not set by this instruction.
FX if(f_real(D[a]) != i_real(result)) then set_FX = 1 else set_FX = 0;
if(set_FX AND !set_FI) then PSW.FX = 1;
31
c
28 27
10
H
20 19
-
18 17
1
H
16 15
-
12 11
a
8 7
4B
H
0

Table of Contents

Related product manuals