Specifications

Table Of Contents
Altera Corporation 8–89
October 2007 Nios II Processor Reference Handbook
sra
sra
shift right arithmetic
Operation:
rC
(signed) rA >> ((unsigned) rB
4..0
)
Assembler Syntax:
sra rC, rA, rB
Example:
sra r6, r7, r8
Description: Shifts rA right by the number of bits specified in rB
4..0
(duplicating the sign bit), and then
stores the result in rC. Bits 31–5 are ignored.
Usage:
sra performs the signed >> operation of the C programming language.
Instruction Type: R
Instruction Fields: A = Register index of operand rA
B = Register index of operand rB
C = Register index of operand rC
313029282726252423222120191817161514131211109876543210
ABC0x3b00x3a