Altera Nios II User Manual page 269

Hide thumbs Also See for Nios II:
Table of Contents

Advertisement

Chapter 8: Instruction Set Reference
Instruction Set Reference
sra
Operation:
Assembler Syntax:
Example:
Description:
Usage:
Exceptions:
Instruction Type:
Instruction Fields:
31
30
29
28
27
26
25
A
February 2014 Altera Corporation
rC ← (signed) rA >> ((unsigned) rB
sra rC, rA, rB
sra r6, r7, r8
Shifts rA right by the number of bits specified in rB
the result in rC. Bits 31–5 are ignored.
sra performs the signed >> operation of the C programming language.
None
R
A = Register index of operand rA
B = Register index of operand rB
C = Register index of operand rC
24
23
22
21
20
19
18
17
B
C
)
4..0
(duplicating the sign bit), and then stores
4..0
16
15
14
13
12
11
10
9
0x3b
shift right arithmetic
8
7
6
5
4
3
2
1
0
0x3a
Nios II Processor Reference Handbook
8–89
0

Advertisement

Table of Contents
loading

Table of Contents