Encoding:

SPECIAL

000000

rs

rt

rd

0000

R

1

SRLV

000110

6

5

5

5

4

1

6

Format:

ROTRV rd, rt, rs

SmartMIPS Crypto, MIPS32 Release 2

Rotate Word Right Variable

Purpose:

Rotate Word Right Variable

To execute a logical right-rotate of a word by a variable number of bits.

Description:

 GPR[rd] = GPR[rt] <=(right) GPR[rs]

The contents of the low-order 32-bit word of GPR rt are rotated right; the word result is sign-extended and placed in

GPR rd. The bit-rotate amount is specified by the low-order 5 bits of GPR rs.

Restrictions:

If GPR rt does not contain a sign-extended 32-bit value (bits 63..31 equal), then the result of the operation is

UNPREDICTABLE.

Operation:

if NotWordValue(GPR[rt]) or
   ((ArchitectureRevision() < 2) and (Config3SM = 0)) then
   UNPREDICTABLE 
endif
s = GPR[rs]4..0
temp = GPR[rt]s-1..0 || GPR[rt]31..s
GPR[rd] = sign_extend(temp)

Exceptions:

Reserved Instruction