549 views
1 votes
1 votes
Assume that ADD x, y, z; denotes x ← y + z, SUB x, y, z; x ← y – z and MUL x, y, z; denotes x ← y ∗ z. Consider the following assembly code.

I1: SUB R1,R2,R3

I2:ADD R2,R1 R3

I3:ADD R3 R1 R2

I4:SUB R1 R2 R2
Find the number of RAW dependencies in the above assembly code.
a.  2
b.  5

c. 3

d. 6

1 Answer

Best answer
4 votes
4 votes

$4$ RAW dependencies :

  • $I1-I2 \left \{ R1 \right \}$
  • $I1-I3 \left \{ R1 \right \}$
  • $I2-I3 \left \{ R2 \right \}$
  • $I2-I4 \left \{ R2 \right \}$
selected by

Related questions

3 votes
3 votes
0 answers
1
1 votes
1 votes
1 answer
2
arch asked Dec 19, 2017
1,457 views
0 votes
0 votes
0 answers
3
pa-try asked Dec 14, 2017
769 views