Техническая Спецификация для Atmel SAM4S-XPLD Atmel ATSAM4S-XPLD ATSAM4S-XPLD
Модели
ATSAM4S-XPLD
110
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
12.6.5.4 CLZ
Count Leading Zeros.
Syntax
CLZ{cond} Rd, Rm
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.
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{cond} Rn, Operand2
CMN{cond} Rn, Operand2
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.
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.
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.
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