Encoding:

EXTEND

11110

sa4:0

0

000000

SHIFT

00110

rx

ry

0

000

SRA

11

5

5

6

5

3

3

3

2

Format:

SRA rx, ry, sa

MIPS16e

Shift Word Right Arithmetic (Extended)

Purpose:

Shift Word Right Arithmetic (Extended)

To execute an arithmetic right-shift of a word by a fi ed number of bits-0 to 31bits.

Description:

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

The 32-bit contents of GPR ry are shifted right, and the sign bit is replicated into the emptied high-order bits. The 5bit sa field specifies the shift amount. The result is placed into G

rx.

Restrictions:

None

Operation:

s = sa
temp = (GPR[Xlat(ry)]31)s || GPR[Xlat(ry)]31..s
GPR[Xlat(rx)] = sign_extend(temp31..0)

Exceptions:

None