Table of Contents

Advertisement

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

8.5.83. sra

Instruction
Operation
Assembler Syntax
Example
Description
Usage
Exceptions
Instruction Type
Instruction Fields
31
30
29
A
15
14
13
0x3b

8.5.84. srai

Instruction
Operation
28
27
26
25
12
11
10
9
28
27
26
25
12
11
10
9
slli r6, r7, 3
Shifts rA left by the number of bits specified in IMM5
(inserting zeroes), and then stores the result in rC.
performs the << operation of the C programming
slli
language.
None
R
= Register index of operand rA
A
= Register index of operand rC
C
= 5-bit unsigned immediate value
IMM5
Bit Fields
24
23
22
21
0
8
7
6
5
IMM5
shift right arithmetic
rC
(signed) rA >> ((unsigned) rB
sra rC, rA, rB
sra r6, r7, r8
Shifts rA right by the number of bits specified in rB
(duplicating the sign bit), and then stores the result in rC.
Bits 31–5 are ignored.
performs the signed >> operation of the C
sra
programming language.
None
R
= Register index of operand rA
A
= Register index of operand rB
B
= Register index of operand rC
C
Bit Fields
24
23
22
21
B
8
7
6
5
0
shift right arithmetic immediate
rC
(signed) rA >> ((unsigned) IMM5)
20
19
18
17
C
4
3
2
1
0x3a
)
4..0
4..0
20
19
18
17
C
4
3
2
1
0x3a
continued...
Nios II Processor Reference Guide
16
0x12
0
16
0x3b
0
223

Advertisement

Table of Contents
loading

Table of Contents