Specifications

Table Of Contents
8–36 Altera Corporation
Nios II Processor Reference Handbook October 2007
cmpgti
cmpgti
compare greater than signed immediate
Operation: if ((signed) rA > (signed) IMMED)
then rB
1
else rB
0
Assembler Syntax:
cmpgti rB, rA, IMMED
Example:
cmpgti 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
cmpgti stores 1 to rB; otherwise stores 0 to rB.
Usage:
cmpgti performs the signed > operation of the C programming language. The
maximum allowed value of IMMED is 32766. The minimum allowed value is –32769.
Pseudoinstruction:
cmpgti is implemented using a cmpgei instruction with an immediate value
IMMED + 1.