Question: Consider the following assembly program written for a 3 2 - bit MIPS machine with no delayed branches. li r 2 0 , 0 #
Consider the following assembly program written for a bit MIPS machine with no delayed
branches.
li r # load immediate
li r
li r
start:
ld rr # load into r from memory
add r r r
addi r r # add immediate
sub r r r
bnez r start # jump to start if r not equal with zero
a Identify the RAW, WAR and WAW conflicts in the assembly program.
b Assume that the program is run on a machine where there is a stall of cycles between
the writing and the reading of a register
Rewrite the assembly program by inserting NOP
operations where there will be stalls. Unroll the loop in the program times in software
assembly Transform the program by register renaming such that the number of stalls is
minimized.
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
