5.4. Conditional execution

In ARM state, each data processing instruction has an option to set ALU status flags in the Current Program Status Register (CPSR) according to the result of the operation.

In Thumb state, there is no option. All data processing instructions set the ALU status flags in the CPSR, except when one or more high registers are used in MOV and ADD instructions. MOV and ADD cannot update the status flags in these cases.

Every ARM instruction can be executed conditionally on the state of the ALU status flags in the CPSR. See Table 5.1 for a list of the suffixes to add to instructions to make them conditional.

In ARM state, you can:

In Thumb state you cannot execute data operations without updating the flags, and conditional execution can only be achieved using conditional branches. The only Thumb instruction that can be conditional is the conditional branch instruction (B). The suffixes for this instruction are the same as in ARM state. The branch with link (BL) or branch and exchange instruction set (BX) instructions cannot be conditional.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D
Non-Confidential