Re: Branch prediction



"robertwessel2@xxxxxxxxx" <spamtrap@xxxxxxxxxx> wrote:

Try the Intel docs, including the optimization guides - there's a lot
of information there. In addition, there are bunches of white papers
online describing internals.
...
It's not really that the CPU is emulating any instructions, it's just
trying to execute more of them, and all sorts of things are done to
allow a nominally sequential stream of instructions to execute in
parallel. For example register renaming to eliminate sequential
dependencies, etc. For example, the CPU might detect that it can
issue the next three add instructions in a row all in parallel, since
they don't conflict. Obviously a conditional branch presents a
barrier to that sort of thing, unless you can predict which way the
branch is going to go. And since you can't (usually) predict that
with 100% certainty, the CPU has to be able to back out a bad guess.

Although, unless my memory has gone completely faulty, the more recent
processors actually use register renaming to execute BOTH paths of the
conditional, and simply discard half of the results when the result of the
jump is finally known.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

.



Relevant Pages

  • Re: Adjusting PC Hyperthreading for Spice Simulation
    ... 3 instructions (or 3 cycles' worth of instructions) per CPU ... PPro upwards can execute multiple load/store ... 1100 MHz to 1400 MHz CPU cores had appeared we had DDR 333 ram. ...
    (sci.electronics.design)
  • Re: Plz explain me the following code
    ... There are CPUs available who can execute multiple ... That means that the CPU uses multiple ... instructions in parallel, a mixup of all - and a compiler that is able ...
    (comp.lang.c)
  • Re: multicore lisp?
    ... executed conditionally depending on the state of a control flag. ... cleared a "run" flag that determined whether following instructions ... would execute or be ignored. ... The CM-5 also had four vector FPUs per CPU. ...
    (comp.lang.lisp)
  • Re: Question for Cameron MacKinnon if hes around
    ... > CPU are dedicated to some basic heuristics about which branches are ... You also have the situation where the CPU detects that a branch ... instead of choosing one branch over the other, execute _both_ branches ... be lower since some instructions will be executed and later discarded, ...
    (comp.lang.lisp)
  • Re: Thinking assembly?
    ... I simply needs to understand the CPU and how it works, ... > understand the instructions, be a good and experienced programmer, ... assembly language is the machine's language (or, at least, ...
    (alt.lang.asm)