Question 8 Please Help Keep Getting Partial Credit Legv8 Question Mistakes Make Q43887968
Question 8. Please help I keep getting partial credit in LEGv8question. What mistakes did I make?
Partial Question 8 6/10 pts What is the LEVV8 assembly for the following code snippet: a = 0; for(i = 0; i < 5; i++){ a = a + B[i]; Assume ‘a’is in X9 and the base address of Bis in X10. T’is in X11 and B stores 64-bit integers. Label Instruction Description LDUR X9, #0 Initialize ‘a’ to zero. LDUR X11, #0 Initialize ‘i’ to zero. LOOP: SUBIS x12,x11,#5 Subtract 5 from ‘I’ storing the result in X12 and setting the condition code. Subtract B.GE EXIT Conditional branch to EXIT if the previous result was greater than or equal to zero (signed). MUL X12, X11,8 Multiply ‘i’ appropriately to compute the offset putting the result in X12 ADD X12, X10, X12 Add the offset of ”to the base address of B putting the result in X12 LDUR X12. [X12] Load the value at Bindex i into X12 ADD X9,X9,X12 Increment ‘a’ by the value of B index i ADDIX11, X11 #1 Increment ‘i’ by 1. BLOOP Unconditionally branch to the label LOOP EXIT Show transcribed image text Partial Question 8 6/10 pts What is the LEVV8 assembly for the following code snippet: a = 0; for(i = 0; i
Expert Answer
Answer to Question 8. Please help I keep getting partial credit in LEGv8 question. What mistakes did I make?…
OR