rrx
Rotate Right with Extend (Thumb)
RRX{S}.W <Rd>, <Rm>
Thumb-2 32-bit Rotate Right with Extend.
Details
Thumb-2 32-bit Rotate Right with Extend by 1: Rd ← (C : Rm)[32:1], where the Carry flag is rotated into the MSB and the LSB is shifted out to C. If the S suffix is present, N and Z are updated from the result, and C is updated from the shifted-out bit; V is unaffected. Execution state: T32 only.
Pseudocode Operation
shifted_result ← (C : Rm)[32:1]
Rd ← shifted_result
if S then
N ← shifted_result[31]
Z ← (shifted_result == 0)
C ← Rm[0]
Example
RRX.W r0, r2
Encoding
Binary Layout
1110101
0010
0
1111
0
000
Rd
00
11
Rm
Operands
-
Rd
Destination general-purpose register -
Rm
Second source / offset general-purpose register
Reference (Arm AArch32 ISA)
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x01A00060 | RRX{<c>}{<q>} {<Rd>,} <Rm> | A32 | cond | 00011 | 01 | 0 | 0000 | Rd | 00000 | 11 | 0 | Rm | ||
| 0xEA4F0030 | RRX{<c>}{<q>} {<Rd>,} <Rm> | T32 | 1110101 | 0010 | 0 | 1111 | 0 | 000 | Rd | 00 | 11 | Rm |
Description
Rotate Right with Extend provides the value of the contents of a register shifted right by one place, with the Carry flag shifted into bit[31].