You copied the Doc URL to your clipboard.

ARM Compiler armasm User Guide : REV16

REV16

Reverse the byte order in each halfword independently.

Syntax

REV16{cond} Rd, Rn

where:

cond

is an optional condition code.

Rd

is the destination register.

Rn

is the register holding the operand.

Usage

You can use this instruction to change endianness. REV16 converts 16-bit big-endian data into little-endian data or 16-bit little-endian data into big-endian data.

Register restrictions

You cannot use PC for any register.

You can use SP in the A32 instruction but this is deprecated. You cannot use SP in the T32 instruction.

Condition flags

This instruction does not change the flags.

16-bit instructions

The following form of this instruction is available in T32 code, and is a 16-bit instruction:

REV16 Rd, Rm

Rd and Rm must both be Lo registers.

Architectures

This instruction is available in A32 and T32.

Example

    REV16   r0, r0

Related reference

Was this page helpful? Yes No