Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8. (15 pts) Consider two integer arrays B and D of 100 elements. Let X2 and 3 contain the base address of array B and

image text in transcribed

8. (15 pts) Consider two integer arrays B and D of 100 elements. Let X2 and 3 contain the base address of array "B" and "D", respectively, and the index is in X0, h is in X10. Write LEGV8 code to perform the following operations: (a) Get B[15] from memory and put it in register X5. (b) Put the value 132 in D[6]. (c) Translate the following code into LEGv8 instructions int j = 50, h; do { D[2*j] = (B[j] +B[j+2D*9-h; j=j-2: while {j > 0: DO NOT use multiply instruction in your code, use shift instruction for multiplication instead! (d)How many instructions are executed during the running of the code in (c), and how many memory data references are made during execution

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

Step: 3

blur-text-image

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

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions