Table of Contents

Advertisement

Exceptions
Instruction Type
Instruction Fields
31
30
29
A
15
14
13

8.5.15. bne

Instruction
Operation
Assembler Syntax
Example
Description
Exceptions
Instruction Type
Instruction Fields
31
30
29
A
15
14
13
8.5.16. br
Instruction
Operation
Assembler Syntax
Example
Nios II Processor Reference Guide
182
28
27
26
25
12
11
10
9
IMM16
28
27
26
25
12
11
10
9
IMM16
Misaligned destination address
I
= Register index of operand rA
A
= Register index of operand rB
B
= 16-bit signed immediate value
IMM16
Bit Fields
24
23
22
21
B
8
7
6
5
branch if not equal
if (rA != rB)
then PC
PC + 4 + σ(IMM16)
else PC
PC + 4
bne rA, rB, label
bne r6, r7, top_of_loop
If rA != rB, then
transfers program control to the
bne
instruction at label. In the instruction encoding, the offset
given by IMM16 is treated as a signed number of bytes
relative to the instruction immediately following
two least-significant bits of IMM16 are always zero, because
instruction addresses must be word-aligned.
Misaligned destination address
I
= Register index of operand rA
A
= Register index of operand rB
B
= 16-bit signed immediate value
IMM16
Bit Fields
24
23
22
21
B
8
7
6
5
unconditional branch
PC
PC + 4 + σ(IMM16)
br label
br top_of_loop
8. Instruction Set Reference
NII-PRG | 2018.04.18
20
19
18
17
IMM16
4
3
2
1
0x36
. The
bne
20
19
18
17
IMM16
4
3
2
1
0x1e
continued...
16
0
16
0

Advertisement

Table of Contents
loading

Table of Contents