in CO and Architecture
479 views
1 vote
1 vote

 

Consider following assembly-language program:

1: MOV R3, R7

2: LOAD R8, (R3)

3: ADD R3, R3, 4

4: LOAD R9, (R3)

5: BNE R8, R9, L3

The sum of WAW, RAW, and WAR dependencies from the given code are_________

in CO and Architecture
by
479 views

1 Answer

0 votes
0 votes
WAW  I1 – I3 = R3

RAW         I1- I2 = R3                                                                                                                                                                       I1-I3= R3                                                                                                                                                                         I3-I4=R3   

                 I4-I5=R9

                 I2-I5= R8

 

 

WAR     I3-I2 = R3

 

total  =  WAW ( 1) + RAW ( 5) + WAR ( 1 )  = 7

in instruction 5  R8 & R9 only read the value

if their is any mistake please notify me

Related questions

0 votes
0 votes
1 answer
2