ISA & Assembly

What is true of the branch delay slot found in older ISAs such as MIPS (the rule that the one instruction right after a branch always executes, taken or not)?

  1. AIt makes branch prediction 100% accurate and is essential in today's CPUs
  2. BRISC-V adopts it too, so a nop must follow every branch
  3. CIt exposed a quirk of the pipelines of its time in the ISA and later became a burden for CPU designs
Show answer and explanation

Answer: C. It exposed a quirk of the pipelines of its time in the ISA and later became a burden for CPU designs

In a simple five-stage pipeline, the next instruction has already been fetched by the time a branch resolves, so the delay slot made it always execute to avoid waste. In later CPUs with deep pipelines, branch prediction and multiple issue, the benefit vanished and only the burden of special handling for compatibility remained. RISC-V avoids it so as not to bake implementation-dependent rules into the ISA.

  • A. It is not branch prediction and is unnecessary today.
  • B. RISC-V does not have branch delay slots.
  • C. Correct. It froze a microarchitectural detail into the ISA.
Practice this topic Back to topic

More ISA & Assembly questions

  1. On 64-bit RV64I, how does lw place the 32-bit value it loads into a 64-bit register?
  2. Which correctly describes an ABI (application binary interface)?
  3. How is a call through a C function pointer, "(*fp)(x)", generally performed in RISC-V?
  4. Which statement is correct about two CPUs that implement the same instruction set architecture (ISA)?
  5. What is a characteristic of a load-store architecture such as RISC-V?