13.157 SXTB

Sign extend Byte, to extend an 8-bit value to a 32-bit value.


SXTB{cond} {Rd}, Rm {,rotation}



is an optional condition code.


is the destination register.


is the register holding the value to extend.


is one of:

ROR #8

Value from Rm is rotated right 8 bits.

ROR #16

Value from Rm is rotated right 16 bits.

ROR #24

Value from Rm is rotated right 24 bits.

If rotation is omitted, no rotation is performed.


This instruction does the following:

  1. Rotates the value from Rm right by 0, 8, 16 or 24 bits.

  2. Extracts bits[7:0] from the value obtained.

  3. Sign extends to 32 bits.

Register restrictions

You cannot use PC for any operand.

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

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:


Rd and Rm must both be Lo registers.


The 32-bit instruction is available in A32 and T32.

For the Armv7‑M architecture, the 32-bit T32 instruction is only available in an Arm®v7E-M implementation.

The 16-bit instruction is available in T32.

Non-ConfidentialPDF file icon PDF versionDUI0801J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.