Encoding:

RR

11101

rx

ry

SRAV

00111

5

3

3

5

Format:

SRAV ry, rx

MIPS16e

Shift Word Right Arithmetic Variable

Purpose:

Shift Word Right Arithmetic Variable

To execute an arithmetic right-shift of a word by a variable number of bits.

Description:

GPR[ry] = GPR[ry] >> GPR[rx] (arithmetic)

The 32-bit contents of GPR ry are shifted right, and the sign bitis replicated into the emptied high-order bits;the word result is placed back in GPR ry. The 5 low-order bits of GPR rx specify the shift amount.

Restrictions:

None

Operation:

s = GPR[Xlat(rx)]4..0
temp = (GPR[Xlat(ry)]31)s || GPR[Xlat(ry)]31..s
GPR[Xlat(ry)] = temp

Exceptions:

None