Question: Please help I keep getting partial credit in LEGv8 question. What mistakes did I make? Partial Question 5 2/6 pts Write the LEGv8 assembly for

Please help I keep getting partial credit in LEGv8 question. What mistakes did I make?

Please help I keep getting partial credit in LEGv8 question. What mistakes

Partial Question 5 2/6 pts Write the LEGv8 assembly for the following code snippet (assuming the base address of A is in X9, the base address of Bis in X10, i is in X11 and jis in X12 and that A and B store 64-bit integer values): A[i] = B[j]; NOTE: There should be no extraneous spaces in your answers, and all instructions and register characters should be capitalized. Commas are used appropriately to separate instruction arguments with a single space after Instruction Description / Comments LSLX13, X12, #3 Compute offset of elementi putting the result in register X13 ADD X13X13, X1C Compute absolute address of B, element j putting the result in register X13 LDUR X13, [X13,Move B, element from memory into register X13 LSLX14, X11.#3 Compute offset of elementi putting the result in register X14 ADD X14X14,X9 Compute absolute address of A, element i putting the result in register X14 STURX13. [X14, #0 Move the value from register X13 into A. elementi in memory Answer 1: LSL X13, X12, #3 Answer 2: ADD X13X13, X10 Answer 3: LDUR X13,[X13,#0] Answer 4: LSL X14, X11,#3 Answer 5: ADD X14X14,X9 Answer 6: STURX13. [X14, #O] Partial Question 5 2/6 pts Write the LEGv8 assembly for the following code snippet (assuming the base address of A is in X9, the base address of Bis in X10, i is in X11 and jis in X12 and that A and B store 64-bit integer values): A[i] = B[j]; NOTE: There should be no extraneous spaces in your answers, and all instructions and register characters should be capitalized. Commas are used appropriately to separate instruction arguments with a single space after Instruction Description / Comments LSLX13, X12, #3 Compute offset of elementi putting the result in register X13 ADD X13X13, X1C Compute absolute address of B, element j putting the result in register X13 LDUR X13, [X13,Move B, element from memory into register X13 LSLX14, X11.#3 Compute offset of elementi putting the result in register X14 ADD X14X14,X9 Compute absolute address of A, element i putting the result in register X14 STURX13. [X14, #0 Move the value from register X13 into A. elementi in memory Answer 1: LSL X13, X12, #3 Answer 2: ADD X13X13, X10 Answer 3: LDUR X13,[X13,#0] Answer 4: LSL X14, X11,#3 Answer 5: ADD X14X14,X9 Answer 6: STURX13. [X14, #O]

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!