BFI
Bit Field Insert.
Syntax
BFI
{
}
cond
, Rd
,
#Rn
, #lsb
width
where:
cond
is an optional condition code.
Rd
is the destination register.
Rn
is the source register.
lsb
is the least significant bit that is to be copied.
width
is the number of bits to be copied.
must not be 0, and (width
+width
) must be less than or equal to 32.lsb
Operation
Inserts adjacent bits from one register into another.
bits in width
, starting at
Rd
, are replaced by
lsb
bits from
width
, starting at bit[0]. Other bits in
Rn
are unchanged.Rd
Register restrictions
You cannot use PC for any register.
You can use SP in the BFI
A32 instruction
but this is deprecated. You cannot use SP in the BFI
T32
instruction.
Condition flags
The BFI
instruction does not change
the flags.
Architectures
This 32-bit instruction is available in A32 and T32.
There is no 16-bit version of this instruction in T32.