Question: 2.25 Consider the following LEGv8 loop: LOOP: SUBIS X1, X1, #0 B. LE DONE ADDI XO, XO #2 B LOOP DONE: 2.25.1 15) Assume that
2.25 Consider the following LEGv8 loop: LOOP: SUBIS X1, X1, #0 B. LE DONE ADDI XO, XO #2 B LOOP DONE: 2.25.1 15) Assume that the register X1 is initialized to the value 10. What is the final value in register XO assuming the XO is initially zero? 2.25.2 [S For the loop above, write the equivalent C code. Assume that the registers X0, and X1 are integers acc and i respectively 2.25.3 15 For the loop written in LEGv8 assembly above, replace the instruction "B. LE DONE"instruction with "8.MI DONE: What is the final value in register X0 assuming the XO is initially zero 2.25.5 [5 For the loop written in LEGv8 assembly above, replace the instruction "B. LE DOE" instruction withBMI DONE" and write equivalent C 2.25.6 [5 Show how you can reduce the number of instructions by combining the SUBIS and SUB1 instructions. (Hint: Add one instruction outside the loop.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
