| |||
Home > Condition Codes > Conditional instructions |
You can execute an instruction conditionally based upon the ALU status flags set by another instruction, either:
immediately after the instruction that updated the flags
after any number of intervening instructions that have not updated the flags.
The instructions that you can make conditional depends on whether the processor is in ARM state or Thumb state.
To make an instruction conditional, you must add a condition code suffix to the instruction mnemonic. The condition code suffix enables the processor to test a condition based on the flags. If the condition test of a conditional instruction fails, the instruction:
does not execute
does not write any value to its destination register
does not affect any of the flags
does not generate any exception.