You copied the Doc URL to your clipboard.

7.12 Condition code suffixes and related flags

Condition code suffixes define the conditions that must be met for the instruction to execute.

The following table shows the condition codes that you can use and the flag settings they depend on:

Table 7-2 Condition code suffixes and related flags

EQZ setEqual
NEZ clearNot equal
CS or HSC setHigher or same (unsigned >= )
CC or LOC clearLower (unsigned < )
MIN setNegative
PLN clearPositive or zero
VSV setOverflow
VCV clearNo overflow
HIC set and Z clearHigher (unsigned >)
LSC clear or Z setLower or same (unsigned <=)
GEN and V thesameSigned >=
LTN and V differSigned <
GTZ clear, N and V thesameSigned >
LEZ set, N and V differSigned <=
ALAnyAlways. This suffix is normally omitted.

The optional condition code is shown in syntax descriptions as {cond}. This condition is encoded in A32 instructions and in A64 instructions. For T32 instructions, the condition is encoded in a preceding IT instruction. An instruction with a condition code is only executed if the condition flags meet the specified condition.

The following is an example of 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.
Was this page helpful? Yes No