rrx

Rotate Right with Extend (A32)

RRX{S}<c> <Rd>, <Rm>

Shifts register right by 1, inserting Carry flag into MSB.

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 r0, r2

Encoding

Binary Layout
cond
31:28
00011
27:23
01
22:21
0
20
0000
19:16
Rd
15:12
00000
11:7
11
6:5
0
4
Rm
3:0
 
Format Data Proc
Opcode 0x01A00060
Extension A32 (Base)

Operands

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

Related

Other forms of rrx

  • rrx Rotate Right with Extend (Thumb)

More in A32 (Base)

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