Question: Given the following segment of C code, c = (a + b) * a; e = (b + c) * d; f = c +

Given the following segment of C code, c = (a + b) * a; e = (b + c) * d; f = c + e;

Based on the following assumptions on information size: - opcode: 8 bits - each data (operand) item: 16 bits - each register specifer: 4 bits - each address: 16 bits

for each of the following "memory-aligned" machines (a) an 16-bit (0,3)-GPR architecture (b) an 16-bit (1,2)-GPR architecture (c) an 16-bit (3,3)-GPR architecture

recompile the code into the most memory-access-efficient assembly code (write "same" if it is not changed). The effciency is in terms of the total size of memory accesses including the instruction accesses and operand accesses (reads and writes). Calculate the number of total memory accesses in terms of bytes for each of the machines. Note: round to the next larger integer for byte number calculation.

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!