Comparison Instructions; Shift And Rotate Instructions - Intel NIOS II Owner Reference Manual

Table of Contents

Advertisement

Table 50.
Move Instructions
Instruction
copies the value of one register to another register.
mov
mov
register, and sign-extends the value to 32 bits.
movhi
or upper 16-bits of a register, inserting zeros in the remaining bit positions. Use
movi
address.
movui
movia

3.9.4. Comparison Instructions

The Nios II architecture supports a number of comparison instructions. All of these
compare two registers or a register and an immediate value, and write either one (if
true) or zero to the result register. These instructions perform all the equality and
relational operators of the C programming language.
Table 51.
Comparison Instructions
Instruction
cmpeq
cmpne
cmpge
cmpgeu
cmpgt
cmpgtu
cmple
cmpleu
cmplt
cmpltu
cmpeqi
cmpnei
cmpgei
cmpgeui
cmpgti
cmpgtui
cmplei
cmpleui
cmplti
cmpltui

3.9.5. Shift and Rotate Instructions

The following instructions provide shift and rotate operations. The number of bits to
rotate or shift can be specified in a register or an immediate value.
Nios II Processor Reference Guide
102
==
!=
signed >=
unsigned >=
signed >
unsigned >
unsigned <=
unsigned <=
signed <
unsigned <
These instructions are immediate versions of the comparison operations. They compare the value of a
register and a 16-bit immediate value. Signed operations sign-extend the immediate value to 32-bits.
Unsigned operations fill the upper bits with zero.
Description
moves a 16-bit signed immediate value to a
movi
and
move a 16-bit immediate value into the lower
movui
movhi
Description
3. Programming Model
NII-PRG | 2018.04.18
to load a register with an
movia

Advertisement

Table of Contents
loading

Table of Contents