Question: please only do e, f & g 2. Consider the following LEGv8 loop: LOOP: SUBIS X1, X1, #0 B.LT DONE SUBI X1, X1, #2 ADDI

please only do e, f & g  please only do e, f & g 2. Consider the following

2. Consider the following LEGv8 loop: LOOP: SUBIS X1, X1, #0 B.LT DONE SUBI X1, X1, #2 ADDI , , #1 B LOOP DONE: Assume that the register x1 is initialized to the value 10. What is the final value of a. b. For the loop above, write the equivalent C code. Assume that the registers XO and X1 c. For the loop written in LEGv8 assembly above, assume that the register X1 is d. For the loop written in LEGv8 assembly above, replace the instruction "B.LT DONE" e. For the loop written in LEGv8 assembly above, replace the instruction "B.LT DONE" f. What is the purpose of the SUBIS instruction in the assembly code above? register XO, assuming XO is initially zero? are integers acc and i, respectively. initialized to the value N. How many LEGv8 instructions are executed? instruction with "B.MI DONE". What is the final value in register XO assuming XO is initially zero? instruction with "B.MI DONE" and write equivalent C code. Show how you can reduce the number of instructions by combining the SUBIS and 8. SUBI instructions. (Hint: Add one instruction outside the loop.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!