Instruction
Description
bltu
beq
bne
Related Information
Comparison Instructions
on page 102
3.9.7. Other Control Instructions
Table 55.
Other Control Instructions
Instruction
Description
trap
eret
The
trap
and
eret
instructions generate and return from exceptions. These instructions are similar to the
call
/
ret
pair, but are used for exceptions.
trap
saves the
status
register in the
estatus
register, saves
the return address in the
ea
register, and then transfers execution to the general exception handler.
eret
returns from exception processing by restoring
status
from
estatus
, and executing the instruction specified
by the address in
ea
.
break
bret
The
break
and
bret
instructions generate and return from breaks.
break
and
bret
are used exclusively by
software debugging tools. Programmers never use these instructions in application code.
rdctl
wrctl
These instructions read and write control registers, such as the
status
register. The value is read from or
stored to a general-purpose register.
flushd
flushda
flushi
initd
initda
initi
These instructions are used to manage the data and instruction cache memories.
flushp
This instruction flushes all prefetched instructions from the pipeline. This is necessary before jumping to
recently-modified instruction memory.
sync
This instruction ensures that all previously-issued operations have completed before allowing execution of
subsequent load and store operations.
rdprs
wrprs
These instructions read and write a general-purpose registers between the current register set and another
register set.
wrprs
can set
r0
to 0 in a shadow register set. System software must use
wrprs
to initialize
r0
to 0 in each
shadow register set before using that register set.
3.9.8. Custom Instructions
The
custom
instruction provides low-level access to custom instruction logic. The
inclusion of custom instructions is specified with the Nios II Processor parameter
editor in Platform Designer, and the function implemented by custom instruction logic
is design dependent.
For more information, refer to the “Custom Instructions” section of the Processor
Architecture chapter of the Nios II Processor Reference Handbook
For continued more information refer to the Nios II Custom Instruction User Guide.
Machine-generated C functions and assembly language macros provide access to
custom instructions, and hide implementation details from the user. Therefore, most
software developers never use the
custom
assembly language instruction directly.
3. Programming Model
NII-PRG | 2018.04.18
Nios II Processor Reference Guide
104