GATE / CS ARCHIVE

GATE CSE 2008 / QUESTION 76

Semantics of an unconditional delay slot

Computer Organization & Architecture · Pipelining & Hazards · Full GATE CSE 2008 paper

GATE 2008, Q76 2 marks · MCQ
Report issue

Pipelining & Hazards

Question 76, GATE 2008: Delayed branching handles control hazards. For a delayed conditional branch, regardless of whether the condition is true or false, which statement holds?

(A) The instruction immediately following the branch in memory is executed
(B) The first instruction in the fall-through path is executed
(C) The first instruction in the taken path is executed
(D) The branch takes longer than any other instruction
Question 76, GATE 2008: Delayed branching handles control hazards. For a delayed conditional branch, regardless of whether the condition is true or false, which statement holds?

(A) The instruction immediately following the branch in memory is executed
(B) The first instruction in the fall-through path is executed
(C) The first instruction in the taken path is executed
(D) The branch takes longer than any other instruction
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. In the ordinary non-annulling delayed-branch model, the instruction immediately following the branch in memory executes before control transfers, regardless of whether the branch is taken. That is the delay-slot instruction, option A.
2. Instructions beyond the delay slot on the fall-through or target paths are not both guaranteed to execute. Some ISAs offer annulled slots, but those are outside the simple delayed-branch model used by this linked pair.

Original paper, page 16