Assembly:

ROTRV rd, rs, rt

nanoMIPS

Rotate Right Variable

Purpose:

Rotate Right Variable. Rotate the word value in register $rs by the shift value contained inregister $rt, and place the result in register $rd.

Availability:

nanoMIPS

Format:

001000

rt

rs

rd

x

0011010

000

6

5

5

5

1

7

3

Operation:

shift = GPR[rt] & 0x1f
tmp = GPR[rs][31:0] @ GPR[rs][31:0]
result = tmp >> shift
GPR[rd] = sign_extend(result, from_nbits=32)

Exceptions:

None.