Nios II Classic Processor Reference Guide

ID 683620
Date 10/28/2016
Public
Document Table of Contents

8.5.30. cmpgtui

Instruction compare greater than unsigned immediate
Operation

if ((unsigned) rA > (unsigned) IMMED)

then rB ←   1

else rB ←  0

Assembler Syntax

cmpgtui rB, rA, IMMED

Example

cmpgtui r6, r7, 100

Description

Zero-extends the immediate value IMMED to 32 bits and compares it to the value of rA. If rA > IMMED, then cmpgtui stores 1 to rB; otherwise stores 0 to rB.

Usage

cmpgtui performs the unsigned > operation of the C programming 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.