\subsection{\index{cmpli}cmpli}

\index{compare for lower with immediate}
CoMPare for Lower with Immediate


\begin{tabular}{l}
  {\bf cmpli Imm8, r2, r1} \\
  {\bf scmpli Imm8, r2, r1} \\
\end{tabular}

~~~~~~
Computes r1 = r2 {\htmlLt} Imm8 ? -1 : 0

In SIMD mode each chunk is compared to the immediate value.

~~~~~~
Similarly to CMPL, with an immediate operand (that is not sign-extended),
compare the two source operands and sets or clear the destination register
according to the result. The comparison is valid only for unsigned values (yet)

~~~~~~
{ \em Remark :} this instruction can't be used for IEEE floating point data
(the comparison is not signed).

\begin{center}

\begin{tabular}{|l|l|l|l|l|l|}
 \hline
\multicolumn{1}{|r| }{size :
} & \multicolumn{1}{c| }{8
} & \multicolumn{1}{c| }{4
} & \multicolumn{1}{c| }{8
} & \multicolumn{1}{c| }{6
} & \multicolumn{1}{c| }{6
 } \\
 \hline
\multicolumn{1}{|r| }{bits :
} & {31 ~ ~ ~ ~ ~ ~ ~ ~ 24
} & {23 ~ ~ ~ ~ 20
} & {19 ~ ~ ~ ~ ~ ~ ~ ~ 12
} & {11 ~ ~ ~ ~ ~ ~ 6
} & {5 ~ ~ ~ ~ ~ ~ 0
 } \\
 \hline
\multicolumn{1}{|r| }{function :
} & \multicolumn{1}{c| }{OP\_CMPLI
} & \multicolumn{1}{c| }{Flags
} & \multicolumn{1}{c| }{Imm8
} & \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
} & {.q, .d or .b postfix
} & {*
} & {Defines the size parameter
 } \\
 \hline
\multicolumn{1}{|c| }{21
} & {s- prefix
} & {1 if set
} & {Defines if the operation is SIMD
 } \\
 \hline
\multicolumn{1}{|c| }{20
} & {(none yet)
} & {0
} & {Reserved
}
\\ \hline

\end{tabular}


~

{\bf Examples : }
\end{center}


R1 contains 0x0000000500000003 (in a 64-bit system)

{\tt
{\bf scmpli.b 0x04,r1,r2 }: r2 = 0x00000000000000FF\\
{\bf cmpli 0x04,r1,r2 }: r2 = 0x0000000000000000
}

{\bf Performance (FC0 only) :}


{\em Execution Unit :} Increment Unit\\
{\em Latency :} 1 cycle\\
{\em Throughput :} 1 per cycle per IU.\\

~

\pagebreak


