SAM3N00A Atmel Corporation, SAM3N00A Datasheet - Page 126

no-image

SAM3N00A

Manufacturer Part Number
SAM3N00A
Description
Manufacturer
Atmel Corporation
Datasheets
10.16.1
10.16.1.1
10.16.1.2
10.16.1.3
10.16.1.4
10.16.1.5
126
BFC
BFI
SAM3N
BFC and BFI
Syntax
Operation
Restrictions
Condition flags
Examples
R4, #8, #12
R9, R2, #8, #12
Bit Field Clear and Bit Field Insert.
where:
cond
Rd
Rn
lsb
width
BFC clears a bitfield in a register. It clears width bits in Rd, starting at the low bit position lsb.
Other bits in Rd are unchanged.
BFI copies a bitfield into one register from another register. It replaces width bits in Rd starting at
the low bit position lsb, with width bits from Rn starting at bit[0]. Other bits in Rd are unchanged.
Do not use SP and do not use PC.
These instructions do not affect the flags.
BFC{cond} Rd, #lsb, #width
BFI{cond} Rd, Rn, #lsb, #width
; Clear bit 8 to bit 19 (12 bits) of R4 to 0
; Replace bit 8 to bit 19 (12 bits) of R9 with
; bit 0 to bit 11 from R2
is an optional condition code, see
is the destination register.
is the source register.
is the position of the least significant bit of the bitfield.
lsb must be in the range 0 to 31.
is the width of the bitfield and must be in the range 1 to 32− lsb.
“Conditional execution” on page
11011A–ATARM–04-Oct-10
84.

Related parts for SAM3N00A