87
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
11.6.3
Instruction Descriptions
11.6.3.1
Operands
An instruction operand can be an ARM register, a constant, or another instruction-specific
parameter. Instructions act on the operands and often store the result in a destination register.
When there is a destination register in the instruction, it is usually specified before the operands.
Operands in some instructions are flexible, can either be a register or a constant. See
11.6.3.2
Restrictions when Using PC or SP
Many instructions have restrictions on whether the Program Counter (PC) or Stack Pointer (SP)
for the operands or destination register can be used. See instruction descriptions for more
information.
Note:
Bit[0] of any address written to the PC with a BX, BLX, LDM, LDR, or POP instruction must be 1
for correct execution, because this bit indicates the required instruction set, and the Cortex-M4
processor only supports Thumb instructions.
11.6.3.3
Flexible Second Operand
Many general data processing instructions have a flexible second operand. This is shown as
Operand2 in the descriptions of the syntax of each instruction.
Operand2 can be a:
•
•
“Register with Optional Shift”
Constant
Specify an Operand2 constant in the form:
#constant
where
constant
can be:
• any constant that can be produced by shifting an 8-bit value left by any number of bits within
a 32-bit word
• any constant of the form 0x00XY00XY
• any constant of the form 0xXY00XY00
• any constant of the form 0xXYXYXYXY.
Note:
In the constants shown above, X and Y are hexadecimal digits.
In addition, in a small number of instructions,
constant
can take a wider range of values.
These are described in the individual instruction descriptions.
When an Operand2 constant is used with the instructions MOVS, MVNS, ANDS, ORRS, ORNS,
EORS, BICS, TEQ or TST, the carry flag is updated to bit[31] of the constant, if the constant is
greater than 255 and can be produced by shifting an 8-bit value. These instructions do not affect
the carry flag if Operand2 is any other constant.
Instruction Substitution
The assembler might be able to produce an equivalent instruction in cases where the user spec-
ifies a constant that is not permitted. For example, an assembler might assemble the instruction
CMP
Rd
,
#0xFFFFFFFE as the equivalent instruction CMN
Rd
, #0x2.
Содержание SAM4S Series
Страница 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1142: ...1142 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 3 100 ball VFBGA Package Drawing ...
Страница 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Страница 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...