Table of Contents

Advertisement

8. Instruction Set Reference
NII-PRG | 2018.04.18
Description
Exceptions
Instruction Type
Instruction Fields
31
30
29
A
15
14
13
0x2e

8.5.95. wrprs

Instruction
Operation
Assembler Syntax
Example
Description
Usage
Exceptions
Instruction Type
Instruction Fields
31
30
29
A
15
14
13
0x14
28
27
26
25
12
11
10
9
28
27
26
25
12
11
10
9
Writes the value contained in register rA to the control
register ctlN.
Supervisor-only instruction
R
= Register index of operand rA
A
= Control register index of operand ctlN
N
Bit Fields
24
23
22
21
0
8
7
6
5
N
write to previous register set
prs.rC
rA
wrprs rC, rA
wrprs r6, r7
Copies the value of rA in the current register set to rC in the
previous register set. This instruction can set r0 to 0 in a
shadow register set.
The previous register set is specified by status.PRS. By
default, status.PRS indicates the register set in use before
an exception, such as an external interrupt, caused a
register set change.
To write to an arbitrary register set, software can insert the
desired register set number in
executing
.
wrprs
System software must use
each shadow register set before using that register set.
If shadow register sets are not implemented on the Nios II
core,
is an illegal instruction.
wrprs
Supervisor-only instruction
Illegal instruction
R
= Register index of operand rA
A
= Register index of operand rC
C
Bit Fields
24
23
22
21
0
8
7
6
5
0
20
19
18
17
0
4
3
2
1
0x3a
prior to
status.PRS
to initialize
to 0 in
wrprs
r0
20
19
18
17
C
4
3
2
1
0x3a
Nios II Processor Reference Guide
16
0x2e
0
16
0x14
0
231

Advertisement

Table of Contents
loading

Table of Contents