a) Unroll the above loop as many times as necessary to schedule it without any delays, collapsing the loop overhead instructions.
Loop:
LD MULTF
FO,0(R1)
F0,F0,F2
F4,0(R2)
LD MULTF
F4,F4,F6
SUBF
F0,F0,F4
SD SUBI SUBI
0(R1),FO
R1,R1,8
R2,R2,8
LD MULTF
FO,0(R1)
F0,F0,F2
F4,0(R2)
LD MULTF
F4,F4,F6
SUBF
F0,F0,F4
SD SUBI SUBI
0(R1),FO
R1,R1,8
R2,R2,8
LD MULTF
FO,0(R1)
F0,F0,F2
F4,0(R2)
LD MULTF
F4,F4,F6
SUBF
F0,F0,F4
SD SUBI SUBI
0(R1),FO
R1,R1,8
R2,R2,8
...
b) Briefly show the scheduling of the entire loop iterations.
Iteration 1:
LD MULTF
FO,0(R1)
F0,F0,F2
F4,0(R2)
LD MULTF
F4,F4,F6
SUBF
F0,F0,F4
SD SUBI SUBI
0(R1),FO
R1,R1,8
R2,R2,8
Iteration 2:
LD MULTF
FO,0(R1)
F0,F0,F2
F4,0(R2)
LD MULTF
F4,F4,F6
SUBF
F0,F0,F4
SD SUBI SUBI
0(R1),FO
R1,R1,8
R2,R2,8
Iteration 3:
LD MULTF
FO,0(R1)
F0,F0,F2
F4,0(R2)
LD MULTF
F4,F4,F6
SUBF
F0,F0,F4
SD SUBI SUBI
0(R1),FO
R1,R1,8
R2,R2,8
...
c) Comment if there are other unrollings feasible
It is not clear from the given information if there are other unrollings feasible.