Groups | Search | Server Info | Login | Register


Groups > comp.lang.forth > #22995

Re: OO dispatch

From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: OO dispatch
Date 2013-05-29 00:00 +0200
Organization 1&1 Internet AG
Message-ID <ko39es$qli$1@online.de> (permalink)
References (7 earlier) <2013May20.132840@mips.complang.tuwien.ac.at> <PeCdnUcty9HjsQfMnZ2dnUVZ_i2dnZ2d@supernews.com> <2013May21.142405@mips.complang.tuwien.ac.at> <KLudnbyedp7EDQbMnZ2dnUVZ_uSdnZ2d@supernews.com> <2013May21.180311@mips.complang.tuwien.ac.at>

Show all headers | View raw


Anton Ertl wrote:
>>It'd be a pretty crap
>>branch predictor that mispredicted an immediate jump, but I'm sure
>>it's possible.
> 
> By that standard, every predictor that predicts direct jumps is crap.

In any case, that's pretty much missing the point.  A current OOO CPU 
decodes 3 or 4 instructions in parallel, and takes several cycles (in the 
pipeline) to complete the decoding, and to do so, they just throw 16 bytes 
into the decoder, each cycle another 16 bytes, because it takes more than 
one cycle until they know how many instructions there really were.  To make 
branches happen quickly, each of these *lines* has a BTB entry associated.  
Whether there's a branch inside or not somewhat matters, as the BTB entries 
are compressed, and "next line" is the best compressed entry.

So the purpose of the branch predictor of direct branches is to predict that 
there is a direct branch within the instructions that are to be decoded in 
the next cycles.  You don't predict a branch when you know that it is a 
branch, you predict it *before* you actually decoded it.

BTW: AMD is going to be one of the Aarch64 vendors, which will have a 
license to implement their own microarchitecture.  So taking the time to 
look how AMD's branch predictors work now is not a waste of time.  They are 
going to reuse them for their Aarch64 implementations.  They may even have 
cross-licensed them with ARM, as ARM did not have the know-how for this sort 
of branch prediction.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: The current object Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-15 16:46 +0200
  Re: The current object Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-15 13:11 -0500
    Re: The current object Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-15 23:23 +0200
      Re: The current object Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-16 02:24 -0500
        Re: The current object anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-05-16 13:55 +0000
        Re: The current object Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-16 17:45 +0200
          Re: The current object Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-18 05:13 -0500
            Re: The current object Doug Hoffman <glidedog@gmail.com> - 2013-05-18 06:43 -0400
            Re: The current object Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-18 10:03 -0500
              Re: The current object Doug Hoffman <glidedog@gmail.com> - 2013-05-18 11:30 -0400
              Re: The current object Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-19 01:20 +0200
                Re: The current object Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-19 12:33 -0500
            Re: The current object Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-19 01:07 +0200
              Re: The current object Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-19 03:58 -0500
    OO dispatch (was: The current object) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-05-16 14:07 +0000
      Re: OO dispatch Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-18 05:28 -0500
        Re: OO dispatch anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-05-20 11:28 +0000
          Re: OO dispatch Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-20 09:00 -0500
            Re: OO dispatch Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-21 01:37 +0200
              Re: OO dispatch Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-21 03:21 -0500
            Re: OO dispatch anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-05-21 12:24 +0000
              Re: OO dispatch Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-21 10:18 -0500
                Re: OO dispatch anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-05-21 16:03 +0000
                Re: OO dispatch Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-05-21 12:55 -0500
                Re: OO dispatch Bernd Paysan <bernd.paysan@gmx.de> - 2013-05-29 00:00 +0200
                Re: OO dispatch Mark Wills <markrobertwills@yahoo.co.uk> - 2013-05-28 15:49 -0700

csiph-web