Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Discuss the general principles of management given by Henri Fayol

Answered: 1 week ago

Question

Detailed note on the contributions of F.W.Taylor

Answered: 1 week ago