\subsection{\index{f2int}f2int}

\index{floating point to integer conversion}
Floating point to INTeger conversion


\begin{tabular}{l}
  {\bf f2int[x] r2, r1} \\
  {\bf sf2int[x] r2, r1} \\
\end{tabular}

~~~~~~
f2int'' converts a floating point number in register r2 into an
integer number, according to the mode flags, and put it in register r1.

\begin{center}

\begin{tabular}{|l|l|l|l|l|l|}
 \hline
\multicolumn{1}{|r| }{size :
} & \multicolumn{1}{c| }{8
} & \multicolumn{1}{c| }{6
} & \multicolumn{1}{c| }{6
} & \multicolumn{1}{c| }{6
} & \multicolumn{1}{c| }{6
 } \\
 \hline
\multicolumn{1}{|r| }{bits :
} & {31 ~ ~ ~ ~ ~ ~ ~ ~ 24
} & {23 ~ ~ ~ ~ ~ ~ 18
} & {17 ~ ~ ~ ~ ~ ~ 12
} & {11 ~ ~ ~ ~ ~ ~ 6
} & {5 ~ ~ ~ ~ ~ ~ 0
 } \\
 \hline
\multicolumn{1}{|r| }{function :
} & \multicolumn{1}{c| }{OP\_F2INT
} & \multicolumn{1}{c| }{Flags
} & \multicolumn{1}{c| }{0
} & \multicolumn{1}{c| }{Reg 2
} & \multicolumn{1}{c| }{Reg 1
}
\\ \hline

\end{tabular}



\begin{tabular}{|l|l|l|l|}
 \hline
\multicolumn{1}{|c| }{~ ~ Flags ~ ~
} & \multicolumn{1}{c| }{Syntax
} & {Values
} & {Function
 } \\
 \hline
\multicolumn{1}{|c| }{23-22
} & {.[??] postfix
} & {00 : 32-bit FP
} & {Defines the size parameter
 } \\
\multicolumn{1}{|c| }{
} & {
} & {01 : 64-bit FP
} & {
 } \\
 \hline
\multicolumn{1}{|c| }{21
} & {s- prefix
} & {1 if set
} & {Defines if the operation is SIMD
 } \\
 \hline
\multicolumn{1}{|c| }{20
} & {-x postfix
} & {1 to skip the tests
} & {IEEE compliance flag
 } \\
 \hline
\multicolumn{1}{|c| }{19-18
} & {
} & {see below
} & {Rounding modes
}
\\ \hline

\end{tabular}


~

\end{center}

Rounding modes:

\begin{center}
\begin{tabular}{|l|l|l|}
 \hline
\multicolumn{1}{|c| }{Value} & {Syntax} & {Rounding mode} \\
 \hline
\multicolumn{1}{|c| }{00} & {-r} & {Nearest (default)} \\
 \hline
\multicolumn{1}{|c| }{01} & {-t} & {Towards 0} \\
 \hline
\multicolumn{1}{|c| }{10} & {-f} & {Towards -infinity} \\
 \hline
\multicolumn{1}{|c| }{11} & {-c} & {Towards +infinity} \\
 \hline
\end{tabular}

\end{center}

~

\pagebreak


