Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

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

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago