Encoding:

SPECIAL

000000

0000

R

1

rt

rd

sa

SRL

000010

6

4

1

5

5

5

6

Format:

ROTR rd, rt, sa 

SmartMIPS Crypto, MIPS32 Release 2

Rotate Word Right

Purpose:

Rotate Word Right

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

Description:

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

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 sa.

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 = sa
temp = GPR[rt]s-1..0 || GPR[rt]31..s
GPR[rd] = sign_extend(temp)

Exceptions:

Reserved Instruction