Specifications
Usage
cmpgtui performs the unsigned > operation of the C program‐
ming language. The maximum allowed value of IMMED is
65534. The minimum allowed value is 0.
Pseudo-instruction
cmpgtui is implemented using a cmpgeui instruction with an
IMM16 immediate value of IMMED + 1.
cmple
Instruction compare less than or equal signed
Operation
if ((signed) rA <= (signed) rB)
then rC ← 1
else rC ← 0
Assembler Syntax
cmple rC, rA, rB
Example
cmple r6, r7, r8
Description
If rA <= rB, then stores 1 to rC; otherwise stores 0 to rC.
Usage
cmple performs the signed <= operation of the C programming
language.
Pseudo-instruction
cmple is implemented with the cmpge instruction by swapping
its rA and rB operands.
cmplei
Instruction
compare less than or equal signed immediate
Operation
if ((signed) rA < (signed) IMMED)
then rB ← 1
else rB ← 0
Assembler Syntax
cmplei rB, rA, IMMED
Example
cmplei r6, r7, 100
Description
Sign-extends the immediate value IMMED to 32 bits and
compares it to the value of rA. If rA <= σ(IMMED), then
cmplei stores 1 to rB; otherwise stores 0 to rB.
Usage
cmplei performs the signed <= operation of the C program‐
ming language. The maximum allowed value of IMMED is
32766. The minimum allowed value is –32769.
8-28
cmple
NII51017
2015.04.02
Altera Corporation
Instruction Set Reference
Send Feedback