| |||
| Home > The Cortex-M4 Instruction Set > Bitfield instructions > BFC and BFI | |||
Bit Field Clear and Bit Field Insert.
BFC{cond} Rd, #lsb, #width
BFI{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
BFC clears a bitfield in a register. It clears bits
in width, starting at
the low bit position Rd. Other
bits in lsb are unchanged.Rd
BFI copies a bitfield into one register from
another register. It replaces bits
in width starting at
the low bit position Rd,
with lsb bits from width starting
at bit[0]. Other bits in Rn are unchanged.Rd