Atmel SAM4S-XPLD Atmel ATSAM4S-XPLD ATSAM4S-XPLD Hoja De Datos

Los códigos de productos
ATSAM4S-XPLD
Descargar
Página de 1125
 110
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
12.6.5.4 CLZ
Count Leading Zeros.
Syntax
CLZ{condRdRm
where:
cond
Rd
is the destination register.
Rm
is the operand register.
Operation
The CLZ instruction counts the number of leading zeros in the value in Rm and returns the result in Rd. The result value
is 32 if no bits are set and zero if bit[31] is set.
Restrictions
Do not use SP and do not use PC.
Condition Flags
This instruction does not change the flags.
Examples
    CLZ      R4,R9
    CLZNE    R2,R3
12.6.5.5 CMP and CMN
Compare and Compare Negative.
Syntax
CMP{condRnOperand2
CMN{condRnOperand2
where:
cond
Rn
is the register holding the first operand.
Operand2
is a flexible second operand. See 
options
Operation
These instructions compare the value in a register with Operand2. They update the condition flags on the result, but do
not write the result to a register.
The CMP instruction subtracts the value of Operand2 from the value in Rn. This is the same as a SUBS instruction,
except that the result is discarded.
The CMN instruction adds the value of Operand2 to the value in Rn. This is the same as an ADDS instruction, except that
the result is discarded.
Restrictions
In these instructions:
Do not use PC
Operand2 must not be SP.
Condition Flags
These instructions update the N, Z, C and V flags according to the result.
Examples