Nios® II Processor Reference Guide

ID 683836
Date 10/22/2020
Public
Document Table of Contents

8.5.27. cmpgt

Instruction compare greater than signed
Operation

if ((signed) rA > (signed) rB)

then rC ←  1

else rC ←  0

Assembler Syntax

cmpgt rC, rA, rB

Example

cmpgt r6, r7, r8

Description

If rA > rB, then stores 1 to rC; otherwise stores 0 to rC.

Usage

cmpgt performs the signed > operation of the C programming language.

Pseudo-instruction

cmpgt is implemented with the cmplt instruction by swapping its rA and rB operands.

Did you find the information on this page useful?

Characters remaining:

Feedback Message