Assembly:

SRAV rd, rs, rt

nanoMIPS

Shift Right Arithmetic Variable

Purpose:

Shift Right Arithmetic Variable. Right shift word value in register $rs by shift amount inregister $rt, duplicating the sign bit (bit 31) in the emptied bits. Place the result in register $rd.

Availability:

nanoMIPS

Format:

001000

rt

rs

rd

x

0010010

000

6

5

5

5

1

7

3

Operation:

shift = GPR[rt] & 0x1f
GPR[rd] = GPR[rs] >> shift

Exceptions:

None.