Specifications

Table Of Contents
Altera Corporation 3–17
October 2007 Nios II Processor Reference Handbook
Programming Model
Move Instructions
These instructions provide move operations to copy the value of a
register or an immediate value to another register. See Table 3–8.
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. See Table 3–9.
addi
subi
muli
These instructions are immediate versions of the add, sub, and mul instructions. The instruction
word includes a 16-bit signed value.
mulxss
mulxuu
These instructions provide access to the upper 32 bits of a 32x32 multiplication operation. Choose
the appropriate instruction depending on whether the operands should be treated as signed or
unsigned values. It is not necessary to precede these instructions with a
mul.
mulxsu
This instruction is used in computing a 128-bit result of a 64x64 signed multiplication.
Table 3–7. Arithmetic and Logical Instructions
Instruction Description
Table 3–8. Move Instructions
Instruction Description
mov
movhi
movi
movui
movia
mov
copies the value of one register to another register. movi moves a 16-bit signed immediate
value to a register, and sign-extends the value to 32 bits.
movui and movhi move an immediate
16-bit value into the lower or upper 16-bits of a register, inserting zeros in the remaining bit
positions. Use
movia to load a register with an address.
Table 3–9. Comparison Instructions (Part 1 of 2)
Instruction Description
cmpeq
==
cmpne
!=
cmpge
signed >=
cmpgeu
unsigned >=
cmpgt
signed >
cmpgtu
unsigned >