US7219216B2

Method for identifying basic blocks with conditional delay slot instructions

Summary by NHIP

Conditional Delay Slot Tagging

The method assigns distinct tags to branch instructions and their delay slot instructions based on branch likelihood predictions. Upon misprediction, it cancels subsequent instructions bearing the second tag, which is generated by incrementing the first tag or assigned specifically to conditional delay slots.

Claim Score by NHIP

Read claim 1, the broadest

Abstract

A first tag is assigned to a branch instruction. Dependent on the type of branch instruction, a second tag is assigned to an instruction in the branch delay slot of the branch instruction. If the branch is mispredicted, the first tag is broadcast to pipeline stages that may have speculative instructions, and the first tag is compared to tags in the pipeline stages to determine which instructions to cancel. The assignment of tags for a fetch group of concurrently fetched instructions may be performed in parallel. A plurality of branch sequence numbers may be generated, and one of the plurality may be selected for each instruction responsive to the cumulative number of branch instructions preceding that instruction within the fetch group. The selection may be further responsive to whether or not the instruction is in a conditional delay slot.

US7219216B2, drawing sheet 1
Sheet 1 of 12

Term

Term ended

Expired 21 August 2022, 4.1 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

4 claims: 1 independent, 3 dependent

  1. 1
    Broadest claimClaim Score 51, average(NHIP)A method comprising:assigning a first tag to instructions in a program order until a branch delay slot instruction is identified, the branch delay slot instruction being an instruction following a branch instruction;determining if the branch instruction is a branch likely or not a branch likely instruction;assigning the first tag to the branch delay slot instruction if the branch instruction is not a branch likely instruction, but assigning a second tag to the branch delay slot instruction if the branch instruction is a branch likely instruction;assigning the second tag to subsequent instructions following the branch delay slot instruction until another branch delay slot instruction is identified;comparing the first tag of the branch instruction with tags assigned to other instructions following the branch instruction, if a misprediction of the branch instruction is identified;and canceling instructions having the second tag in response to the misprediction of the branch instruction, in which the branch delay slot instruction is also canceled only if it has the second tag.