In AArch32 state, the condition flags are held in the Application Program Status Register (APSR). You can read and modify the flags using the read-modify-write procedure.
Most A32 and T32 data processing instructions have an option to update the condition flags according to the result of the operation. Instructions with the optional S suffix update the flags. Conditional instructions that are not executed have no effect on the flags.
Which flags are updated depends on the instruction. Some instructions update all flags, and some update a subset of the flags. If a flag is not updated, the original value is preserved. In the armasm Reference Guide, the description of each instruction mentions the effect that it has on the flags.
Most instructions update the condition flags only if the S
suffix is specified. The instructions
TST always update the flags.