Question: Consider the following C code: int a[10], b[10], c[10], d=9, i; for(i=0; i <10; i++) a[i] = (b[i] + c[i]) - (c[i] * d); a.
Consider the following C code:
int a[10], b[10], c[10], d=9, i;
for(i=0; i<10; i++)
a[i] = (b[i] + c[i]) - (c[i] * d);
a. Write an equivalent assembly code that would yield the lowest number of instructions in LEGv8.
b. Lets say that a[0] is stored at memory address 0x00001000, b[0] at 0x00002003 and c[0] at 0x000040FE. Calculate the total number of memory read and write operations.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
