Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8126043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:01:13+00:00 2026-06-06T07:01:13+00:00

So I understand the basic techniques that are used in branch prediction for pipelined

  • 0

So I understand the basic techniques that are used in branch prediction for pipelined processors – stuff like 2-bit saturated counters, two level adaptive predictors, etc.

Here are my questions:

1) Branch target prediction: why is this important and what are some of the mechanisms used here? When I think of a branch I think “bne r2, r3, LABEL” which says that if r2 != r3 then branch to LABEL which means do PC (program counter) = PC + LABEL. What’s so mysterious about predicting the target here? You know what it’s going to be based on the compiled value of LABEL.
I’m probably missing the point here somehow.

2) Why is the program counter value itself (e.g. 0x4001000C), or at least its last few bits, used as part of the branch prediction scheme? I saw a scheme where the last 4 bits of the PC were concatenated to the (4-bit) branch history register and that 8-bit value was used to access the pattern history table.
I would think the PC is pretty arbitrary!

Thank you for any help understanding these issues

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:01:16+00:00Added an answer on June 6, 2026 at 7:01 am

    What’s so mysterious about predicting the target here? You know what it’s going to be based on the compiled value of LABEL.

    Because of the CPU pipeline depth and the cache latency, it will take many cycles between fetching an instruction, fully decoding it to identify the branch target, and being able to fetch that instruction. So you predict the target in order to pre-emptively fetch the next instruction.

    Why is the program counter value itself (e.g. 0x4001000C), or at least its last few bits, used as part of the branch prediction scheme?

    Becasue the PC uniquely identifies a particular branch instruction! How else are you going to index the branch-prediction table?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to better understand the basic steps needed to a take an
The basic way that I understand Shiro's SecurityUtils.getSubject() to work is that it returns
I need to make sure i understand some basic stuff first: how do i
I encountered some strange behavior which hints that I do not understand some basic
I understand basic regex expressions, but when I see one like this /^(28|29|[3-5][7]*[0-9])$/ I
is there any quick guide to understand basic concept of computer networking like layers
I understand the basic principles of script/style compression. What I would like to know
I understand the basic idea that when an array is the sole operand of
I understand the basic concepts, but are there any special algorithms used or maybe
I don't truly understand some basic things in C like dynamically allocating array of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.