Encoding:

POOL32A

000000

rt

rs

rd

0

ROTRV

0011010000

6

5

5

5

1

10

Format:

ROTRV rd, rt, rs

SmartMIPS Crypto, microMIPS

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