SAM3X8E Atmel Corporation, SAM3X8E Datasheet - Page 114

no-image

SAM3X8E

Manufacturer Part Number
SAM3X8E
Description
Manufacturer
Atmel Corporation
Datasheets
11.13.1.6
11.13.1.7
The example below shows two instructions that add a 64-bit integer contained in R2 and R3 to another 64-bit integer con-
tained in R0 and R1, and place the result in R4 and R5.
11.13.1.8
Multiword values do not have to use consecutive registers. The example below shows instructions that subtract a 96-bit
integer contained in R9, R1, and R11 from another contained in R6, R2, and R8. The example stores the result in R6, R9,
and R2.
11.13.2
11.13.2.1
11.13.2.2
114
114
ADDS
ADC
SUBS
SBCS
SBC
SAM3X/A
SAM3X/A
AND, ORR, EOR, BIC, and ORN
Multiword arithmetic examples
64-bit addition
96-bit subtraction
Syntax
Operation
R4, R0, R2
R5, R1, R3
R6, R6, R9
R9, R2, R1
R2, R8, R11
Logical AND, OR, Exclusive OR, Bit Clear, and OR NOT.
where:
op
S
result of the operation, see
cond
Rd
Rn
Operand2
details of the options.
The AND, EOR, and ORR instructions perform bitwise AND, Exclusive OR, and OR operations
on the values in Rn and Operand2.
The BIC instruction performs an AND operation on the bits in Rn with the complements of the
corresponding bits in the value of Operand2.
The ORN instruction performs an OR operation on the bits in Rn with the complements of the
corresponding bits in the value of Operand2.
op{S}{cond} {Rd,} Rn, Operand2
AND
ORR
EOR
BIC
ORN
; add the least significant words
; add the most significant words with carry
; subtract the least significant words
; subtract the middle words with carry
; subtract the most significant words with carry
is one of:
logical AND.
logical OR, or bit set.
logical Exclusive OR.
logical AND NOT, or bit clear.
logical OR NOT.
is an optional suffix. If S is specified, the condition code flags are updated on the
is an optional condition code, see
is the destination register.
is the register holding the first operand.
is a flexible second operand. See
“Conditional execution” on page
See “Conditional execution” on page
“Flexible second operand” on page 91
96.
11057A–ATARM–17-Feb-12
11057A–ATARM–17-Feb-12
96..
for

Related parts for SAM3X8E