GATE CS 2015, set 3 · Question 49 · Computer Organization and Architecture · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
Consider the following code sequence having five instructions I₁ to I₅. Each of these instructions has the following format.
OP Ri, Rj, Rk
where operation OP is performed on contents of registers Rj and Rk and the result is stored in register Ri.
I₁: ADD R1, R2, R3
I₂: MUL R7, R1, R3
I₃: SUB R4, R1, R5
I₄: ADD R3, R2, R4
I₅: MUL R7, R8, R9
Consider the following three statements.
S1: There is an anti-dependence between instructions I₂ and I₅
S2: There is an anti-dependence between instructions I₂ and I₄
S3: Within an instruction pipeline an anti-dependence always creates one or more stalls
Which one of above statements is/are correct?
- (A) Only S1 is true
- (B) Only S2 is true
- (C) Only S1 and S3 are true
- (D) Only S2 and S3 are true
Answer
Answer (B)
Answer from the official GATE CS 2015 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes