ADD R1 , R2, R2;
ADD R3, R2, R1;
SUB R4, R1 , R5;
ADD R3, R3, R4;
FIND THE NUMBER OF READ AFTER WRITE(RAW) DEPENDENCIES IN THE ABOVE CODE.
RAW dependency are those in which one instruction tries to read before its write operation and also they are occured only in adjacent instruction:
1.
2.
total there are 2 (RAW) dpendecy..
No, this is not the right answer.
See this link
https://gateoverflow.in/29896/number-of-war-dependencies
4 RAW Dependencies.............
and they need not to be adjacent (its Made easy students myth)
There are total 4 RAW dependencies … you have to add non adjacent cases also.