\subsection{\index{fadd}fadd}

\index{floating point addition}
Floating point ADDition


\begin{tabular}{l}
  {\bf fadd[x] r3, r2, r1} \\
  {\bf sfadd[x] r3, r2, r1} \\
\end{tabular}

~~~~~~
Computes r1 = r2 + r3 in IEEE-754 compliant format.

~~~~~~
{\bf fadd }performs a floating addition of the two source operands
(r1 + r2) and puts the result in destination operand
(r3). The operation should be compliant with the IEEE-754 format.


\begin{itemize}
\item The {\bf size }flag indicates that {\bf fadd }performs the
addition on the whole operands or only on a part of the operands.
This size flags is different from the integer size flag: only two
values are currently assigned (01) for 64 bits and (00) for 32 bits.
\item The {\bf SIMD }flag indicates that {\bf fadd }performs
multiple addition on parts of the operand (the size of these parts
is defined by the {\bf size }flags).
\item The {\bf Exception }flag indicates if {\bf fadd }should
generate exceptions (when needed) in accordance to the IEEE-754
standard. When this flag is set, no exception is generated and the
result is biased in an implementation-dependent way. The absence of this
flag (by default) stops the pipeline until the FP execution unit confirms
that an exception should be triggered, because the F-CPU doesn't implement
imprecise exceptions.
\end{itemize}

\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\_FADD
} & \multicolumn{1}{c| }{Flags
} & \multicolumn{1}{c| }{Reg 3
} & \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
} & {(none yet)
} & {0
} & {Reserved
}
\\ \hline

\end{tabular}


~

\end{center}

\pagebreak


