rorv
Rotate Right (Register)
RORV <Wd>, <Wn>, <Wm>
Rotates register right by variable amount.
Details
Rotate Right by variable register count. Rotates the value in Wn right by the number of bits specified in the lower 5 bits of Wm; bits rotated off the right are inserted at the left. Does not affect condition flags (N, Z, C, V remain unchanged). AArch64-only instruction.
Pseudocode Operation
shift_amount ← Wm[4:0]
Wd ← (Wn >> shift_amount) | (Wn << (32 - shift_amount))
Example
RORV w0, w1, w2
Encoding
Binary Layout
0
0
0
11010110
Rm
0010
11
Rn
Rd
Operands
-
Wd
Destination 32-bit integer register -
Wn
First source / base 32-bit integer register -
Wm
Shift Reg
Reference (Arm A64 ISA)
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x1AC02C00 | RORV <Wd>, <Wn>, <Wm> | A64 | 0 | 0 | 0 | 11010110 | Rm | 0010 | 11 | Rn | Rd | ||
| 0x9AC02C00 | RORV <Xd>, <Xn>, <Xm> | A64 | 1 | 0 | 0 | 11010110 | Rm | 0010 | 11 | Rn | Rd |
Description
Rotate Right Variable provides the value of the contents of a register rotated by a variable number of bits. The bits that are rotated off the right end are inserted into the vacated bit positions on the left. The remainder obtained by dividing the second source register by the data size defines the number of bits by which the first source register is right-shifted.
Operation
bits(datasize) result; bits(datasize) operand2 = X[m, datasize]; result = ShiftReg(n, shift_type, UInt(operand2) MOD datasize, datasize); X[d, datasize] = result;