Question: ( Q 4 ) [ 2 0 points ] Assume No branching hazards and no pipelining in this question. ( a ) Translate the following
Q points
Assume No branching hazards and no pipelining in this question.
a Translate the following c code into MIPS Assembly?
Assume the following:
i$s j $s outerLoopLimit innerLoopLimit sum $s prod $s
c code Nested looping example
int i; int j;
while i
j;
while j
if ij
sum i j ;
else
prod i j ;
j ;
end inner loop
i;
end outer loop
b The translation of the statement sum i j ; into MIPS instruction is: add $t$s$s how many times this instruction gets executed in your MIPS code with branches get executed. Trace your MIPS code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
