Specifications

Table Of Contents
8–90 Altera Corporation
Nios II Processor Reference Handbook October 2007
srai
srai
shift right arithmetic immediate
Operation:
rC
(signed) rA >> ((unsigned) IMM5)
Assembler Syntax:
srai rC, rA, IMM5
Example:
srai r6, r7, 3
Description: Shifts rA right by the number of bits specified in IMM5 (duplicating the sign bit), and
then stores the result in rC.
Usage:
srai performs the signed >> operation of the C programming language.
Instruction Type: R
Instruction Fields: A = Register index of operand rA
C = Register index of operand rC
IMM5 = 5-bit unsigned immediate value
313029282726252423222120191817161514131211109876543210
A 0 C 0x3a IMM5 0x3a