Conditionalexecution in T32 code
In T32 code, there are several ways to achieve conditional execution. You can conditionally skip over the instruction using a conditional branch instruction.
Instructions can also be conditionally executed by using either of the following:
CBZ (Conditional Branchon Zero) and
CBNZ (Conditional Branchon Non-Zero) instructions compare the value of a register againstzero and branch on the result.
IT is a 16-bit instruction thatenables a single subsequent 16-bit T32 instruction from a restricted setto be conditionally executed, based on the value of the conditionflags, and the condition code suffix specified.
- Conditional instructions using IT block
; flags set by a previous instruction IT EQ LSLEQ r0, r0, #24 ;…
The use of the IT instruction is deprecated when any of thefollowing are true:
- Thereis more than one instruction in the IT block.
- There is a 32-bit instruction in the IT block.
- The instruction in the IT block references the PC.