大部分的arm指令可以条件执行,也就是可以根据状态寄存器中的值的情况条件执行。
下面是condition code的列表
Opcode[31:28] Mnemonic extension Meaning Condition flag state
0000 EQ Equal Z set
0001 NE Not equal Z clear
0010 CS/HS Carry set/unsigned higher or same C set
0011 CC/LO Carry clear/unsigned lower C clear
0100 MI Minus/negative N set
0101 PL Plus/positive or zero N clear
0110 VS Overflow V set
0111 VC No overflow V clear
1000 HI Unsigned higher C set and Z clear
1001 LS Unsigned lower or same C clear or Z set
1010 GE Signed greater than or equal N set and V set, or N clear and V clear
(N == V)
1011 LT Signed less than N set and V clear, or N clear and V set
(N != V)
1100 GT Signed greater than Z clear, and either N set and V set, or N
clear and V clear (Z == 0,N == V)
1101 LE Signed less than or equal Z set, or N set and V clear, or N clear
and V set (Z == 1 or N != V)
1110 AL Always (unconditional) -
1111 - See Condition code 0b1111 -