Move Instructions - Altera Nios II User Manual

Hide thumbs Also See for Nios II:
Table of Contents

Advertisement

3–58
Arithmetic and Logical Instructions
Logical instructions support and, or, xor, and nor operations. Arithmetic instructions
support addition, subtraction, multiplication, and division operations.
Table 3–42. Arithmetic and Logical Instructions
Instruction
and
These are the standard 32-bit logical operations. These operations take two register values and combine
or
them bit-wise to form a result for a third register.
xor
nor
andi
These operations are immediate versions of the and, or, and xor instructions. The 16-bit immediate value
ori
is zero-extended to 32 bits, and then combined with a register value to form the result.
xori
andhi
In these versions of and, or, and xor, the 16-bit immediate value is shifted logically left by 16 bits to form a
orhi
32-bit operand. Zeroes are shifted in from the right.
xorhi
add
sub
These are the standard 32-bit arithmetic operations. These operations take two registers as input and store
mul
the result in a third register.
div
divu
addi
These instructions are immediate versions of the add, sub, and mul instructions. The instruction word
subi
includes a 16-bit signed value.
muli
These instructions provide access to the upper 32 bits of a 32x32 multiplication operation. Choose the
mulxss
appropriate instruction depending on whether the operands should be treated as signed or unsigned
mulxuu
values. It is not necessary to precede these instructions with a mul.
This instruction is used in computing a 128-bit result of a 64x64 signed multiplication.
mulxsu

Move Instructions

These instructions provide move operations to copy the value of a register or an
immediate value to another register.
Table 3–43. Move Instructions
Instruction
mov
mov copies the value of one register to another register. movi moves a 16-bit signed immediate value to a
movhi
register, and sign-extends the value to 32 bits. movui and movhi move a 16-bit immediate value into the
movi
lower or upper 16-bits of a register, inserting zeros in the remaining bit positions. Use movia to load a
movui
register with an address.
movia
Nios II Processor Reference Handbook
Description
Description
Chapter 3: Programming Model
Instruction Set Categories
February 2014 Altera Corporation

Advertisement

Table of Contents
loading

Table of Contents