| |||
| Home > The Cortex-M3 Instruction Set > Bitfield instructions > SBFX and UBFX | |||
Signed Bit Field Extract and Unsigned Bit Field Extract.
SBFX{cond} Rd, Rn, #lsb, #width
UBFX{cond} Rd, Rn, #lsb, #width
where:
condIs an optional condition code, see Conditional execution.
RdSpecifies the destination register.
RnSpecifies the source register.
lsbSpecifies the position of the least significant
bit of the bitfield. must
be in the range 0 to 31.lsb
widthSpecifies the width of the bitfield and must be
in the range 1 to 32−.lsb
SBFX extracts a bitfield from one register, sign
extends it to 32 bits, and writes the result to the destination
register.
UBFX extracts a bitfield from one register, zero
extends it to 32 bits, and writes the result to the destination
register.