Question: answer part b (a) For the LEGvB assembly instructions below, what is the corresponding C statement? Assume that the variables f, g, h, iaadj are

answer part b (a) For the LEGvB assembly instructions below, what isanswer part b

(a) For the LEGvB assembly instructions below, what is the corresponding C statement? Assume that the variables f, g, h, iaadj are assigned to registers SX0, SX1, SX2, $X3, and SX4, respectively Assume that the base address of the arrays A and B are in registers SX14 and $X15, respectively Blal = A [f] + A [f+1]; LSL X9, X0, #3 ADD X9, X14, X9 LSL X10, XI, #3 ADD X10, X15 X10 LDUR X0, p.9, #01 ADDI X1 1, X9, #8 LDUR X9?(X1 1 , #01 ADD X9, X9, X0 STUR X3, [X1 0, #0] (b) Rewrite the assembly code above to minimize the number of LEGv8 instructions (if possible) needed to carry out the same function. (a) For the LEGvB assembly instructions below, what is the corresponding C statement? Assume that the variables f, g, h, iaadj are assigned to registers SX0, SX1, SX2, $X3, and SX4, respectively Assume that the base address of the arrays A and B are in registers SX14 and $X15, respectively Blal = A [f] + A [f+1]; LSL X9, X0, #3 ADD X9, X14, X9 LSL X10, XI, #3 ADD X10, X15 X10 LDUR X0, p.9, #01 ADDI X1 1, X9, #8 LDUR X9?(X1 1 , #01 ADD X9, X9, X0 STUR X3, [X1 0, #0] (b) Rewrite the assembly code above to minimize the number of LEGv8 instructions (if possible) needed to carry out the same function

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!