ARM Processor Instruction Set
ARM Processor Instruction Set
ARM Processor Instruction Set
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>ARM</strong> <strong>Processor</strong> <strong>Instruction</strong> <strong>Set</strong><br />
5.2 The condition field<br />
31 28 27 0<br />
Cond<br />
Condition field<br />
0000 = EQ - Z set (equal)<br />
0001 = NE - Z clear (not equal)<br />
0010 = CS - C set (unsigned higher or same)<br />
0011 = CC - C clear (unsigned lower)<br />
0100 = MI - N set (negative)<br />
0101 = PL - N clear (positive or zero)<br />
0110 = VS - V set (overflow)<br />
0111 = VC - V clear (no overflow)<br />
1000 = HI - C set and Z clear (unsigned higher)<br />
1001 = LS - C clear or Z set (unsigned lower or same)<br />
1010 = GE - N set and V set, or N clear and V clear (greater or equal)<br />
1011 = LT - N set and V clear, or N clear and V set (less than)<br />
1100 = GT - Z clear, and either N set and V set, or N clear and V clear (greater than)<br />
1101 = LE - Z set, or N set and V clear, or N clear and V set (less than or equal)<br />
1110 = AL - always<br />
1111 = NV - never<br />
Figure 5-2: Condition codes<br />
Note:<br />
All <strong>ARM</strong> processor instructions are conditionally executed, which means that their<br />
execution may or may not take place depending on the values of the N, Z, C and V<br />
flags in the CPSR.<br />
The condition codes have meanings as detailed in ➲Figure 5-2: Condition codes, for<br />
instance code 0000 (EQual) executes the instruction only if the Z flag is set. This would<br />
correspond to the case where a compare (CMP) instruction had found the two<br />
operands to be equal. If the two operands were different, the compare instruction<br />
would have cleared the Z flag and the instruction is not executed.<br />
If the always (AL - 1110) condition is specified, the instruction will be executed<br />
irrespective of the flags. The never (NV - 1111) class of condition codes must not be<br />
used as they will be redefined in future variants of the <strong>ARM</strong> architecture. If a NOP is<br />
required it is suggested that MOV R0,R0 be used. The assembler treats the absence<br />
of a condition code as though always had been specified.<br />
Preliminary - Unrestricted<br />
<strong>ARM</strong>7500 Data Sheet<br />
<strong>ARM</strong> DDI 0050C<br />
5-3