Nios® II Processor Reference Guide

ID 683836
Date 8/28/2023
Public
Document Table of Contents

8.5.31. 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.