Instructions that can be conditional have an optional condition
code, which is shown in syntax descriptions as
This condition is encoded in A32 instructions and in A64 instructions. For
T32 instructions, the condition is encoded in a preceding
An instruction with a condition code is only executed if the condition
flags meet the specified condition.
The following table shows the condition codes that you can use and the flags they depend on.
|Higher or same (unsigned >= )|
|Lower (unsigned < )|
|Positive or zero|
|Higher (unsigned >)|
|Lower or same (unsigned <=)|
|Any||Always. This suffix is normally omitted.|
The following example shows conditional execution in A32 code.
ADD r0, r1, r2 ; r0 = r1 + r2, don't update flags ADDS r0, r1, r2 ; r0 = r1 + r2, and update flags ADDSCS r0, r1, r2 ; If C flag set then r0 = r1 + r2, and update flags CMP r0, r1 ; update flags based on r0-r1.