Conditional executions
Here, we will deal with just one topic, conditional executing, and we will demonstrate how you can ignore an instruction if it does not fulfill a specified criterion (related to the condition control status bits). This mechanism enables programmers to write more compact code.
Consider the add
instruction. When the computer reads it from memory, it is executed, exactly like almost every other computer. The ARM is different; each of its instructions is conditionally executed – that is, an instruction is executed only if a specific condition is met; otherwise, it is bypassed (annulled or squashed). Each ARM instruction is associated with a logical condition (one of the 16 in Table 10.3). If the stated condition is true, the instruction is executed.
A suffix indicates conditional execution by appending condition
– for example, add
eq
r1,r2,r3
specifies that the addition is performed only if the Z-bit in the CCR is set. The RTL form of this operation...