Data Hazards: Solution - I
ADD(r1, r2, r3) ADD(r1, r2, r3)
CMPLEC(r3, 5, r0) MUL(r1, r2, r4)
MUL(r1, r2, r4) as SUB(r1, r2, r5)
SUB(r1, r2, r5) CMPLEC(r3, 5, r0)
Solution I (software)
- “Program around it”
- Compiler inserts NOPs
- Compiler rewrites instruction sequence