Question: Following code lines are written in a high level language: a = c + d; b = c + e; The corresponding instructions for MIPS
Following code lines are written in a high level language:
a = c + d;
b = c + e;
The corresponding instructions for MIPS are:
LW R1, 0(R0)
LW R2, 4(R0)
ADD R3, R1, R2
SW R3, 12(R0)
LW R4, 8(R0)
ADD R5, R1, R4
SW R5, 16(R0)
These instructions are to be executed on a pipelined processor with forwarding.
- Identify hazards by showing the execution of these instructions per cycle bases.
- Reorder these instructions to avoid any pipeline stalls.
- How many cycles are saved after executing the reordered instructions?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
