Question: (a) Write an equivalent routine in LEGv8 assembly language that computes the sum of an array of longs (represented as 64-bit double words) stored in

 (a) Write an equivalent routine in LEGv8 assembly language that computes (a) Write an equivalent routine in LEGv8 assembly language that computes the sum of an array of longs (represented as 64-bit double words) stored in memory. Assume that X0contains the memory address (pointer in C) of the first long in the array, and X1 containsthe number of elements of the array. The total sum value should be returned in registerX7.
(b) What will happen if the given array has these values: [0x7DD554F556556BD9,0x7DD554F556556BD9]?

The following is a C version of a routine that calculates the sum of longs in an array: long array_sum (long *array-pointer, long array_length) { long i; long sum = 0; for (i = 0; i

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!