srai $dest, $src1, imm

Perform an arithmetic shift right by an amount specified in an immediate field.

Format

This is a SHI format instrucion.
31 - 26 25 - 21 20 - 16
15 - 0
111011
dest
src1
000 0000 0000 5-bit Immediate

Functional Description

The srai instruction performs an arithmetic right shift of the contents of register src1 and stores the shifted value in register dest. The shift amount is taken from the 5-bit immediate field. The most significant bit of Register src1 is replicated and is shifted in from the left to replace lost bits.

dest = (signed) src1 >> Imm;

Side Effects

None

Processor Mode

This is a user-level instruction.


Last modified: Fri Feb 23 02:56:02 CST 2001