rrx

Rotate Right with Extend (Thumb)

RRX{S}.W <Rd>, <Rm>

Thumb-2 32-bit Rotate Right with Extend.

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
31:25
0010
24:21
0
20
1111
19:16
0
15
000
14:12
Rd
11:8
00
7:6
11
5:4
Rm
3:0
 
Format Thumb2 Data Proc
Opcode 0xEA4F0030
Extension T32 (Thumb2)

Operands

  • Rd
    Destination general-purpose register
  • Rm
    Second source / offset general-purpose register

Related

Other forms of rrx

  • rrx Rotate Right with Extend (A32)

More in T32 (Thumb2)

Reference

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