A characteristic of the ARM architecture is its predicated execution model. Inst
ID: 3818480 • Letter: A
Question
A characteristic of the ARM architecture is its predicated execution model. Instructions can be conditionally executed depending on the status flags on the CPU. For example, store can be conditionally executed by predicating the instruction with the lt suffix: strlt r2, [r0], #4. Predicated execution is not readily available in the Cortex-M series. For this purpose, the ARM v7-M architecture defines the it instruction. Describe the functionality of this instruction. Utilize this instruction to write a small routine that clears the .bss segment of a program. You may assume that the start address of the .bss segment is at __bss_start__ and the end address at __bss_end__.Explanation / Answer
The IT instruction makes up to four following instructions (the IT block) conditional. The conditions can be all the same, or some of them can be the logical inverse of the others.
Syntax is ::
x: specifies condition switch for the 2nd instruction in the IT block
y: specifies condition switch for the 3rd instruction in the IT block
z: specifies condition switch for the 4th instruction in the IT block
condition: specifies condition for the 1st instruction in the IT block
The condition switch for the second, third and fourth instruction in the IT block can be either:
T :: Then. Applies the condition "condition" to the instruction
E :: Else. Applies the inverse condition of "condition" to the instruction
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.