You copied the Doc URL to your clipboard.

4.6. Instructions to reverse bytes in a general-purpose register

When an application or device driver has to interface to memory-mapped peripheral registers or shared-memory DMA structures that are not the same endianness as that of the internal data structures, or the endianness of the Operating System, an efficient way of being able to explicitly transform the endianness of the data is required.

The following new instructions are added to the ARM and Thumb instruction sets to provide this functionality:

  • reverse word (4 bytes) register, for transforming big and little-endian 32-bit representations

  • reverse halfword and sign-extend, for transforming signed 16-bit representations

  • Reverse packed halfwords in a register for transforming big- and little-endian 16-bit representations.

These instructions are described in ARM1136JF-S instruction set summary.