Question: 2 ) ( 5 + 2 5 = 3 0 pts ) In assembly level, a code of loop structure can be either implemented using

2)(5+25=30 pts) In assembly level, a code of loop structure can be either implemented using a branch forward or a branch backward approach. a) Name the advantages and disadvantages using one versus the other, in terms of speed, applicability, code size and other possible relevant factors. Clearly explain your conclusion. b) For the following segment of C program, determine which approach is applicable, and then write the most efficient DLX assembly code for it. Assume that r1 is already assigned to x as a temporary register, r2 for i and r3 for j.
x=50;
for(i=30; i>10; i=i-3)
for(j=i; j

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 Programming Questions!