rev16

Reverse Bytes in Halfwords (Thumb)

REV16 <Rd>, <Rm>

Reverses bytes in each 16-bit halfword.

Details

The Reverse Bytes in Halfwords instruction reverses bytes in each 16-bit halfword.

Pseudocode Operation

Rd ← byte-reverse of Rm

Example

REV16 r0, r2

Encoding

Binary Layout
111110101001
Rm
1111
Rd
1001
 
Format Thumb Misc
Opcode 0xFA90F090
Extension A32 (Base)

Operands

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