McKown, John wrote:
I know "it's the one not taken!". But of the B, J, or BR, can they be ordered? 
I am 99.9% certain that having the branch address in a register is the fastest. But is it 
significant enough that I should dedicate a register for it? I'm asking because I'm 
reoptimizing some code which is very heavily used. So heavy, that a 1% improvement is 
worth while. I am currenly holding 4 different addresses in registers to speed up branch 
processing in my main loop.  This loop is basically compressing blanks using a primitive 
RLE algorithm.

The processor has the concept of branch prediction and history. A so-called "surprise" branch is one with no known history. J can be easily predicted to repeat the same way every time. B has the potential for the base and/or index registers to change, so there is extra validation late in the pipeline to ensure the guess was correct. Same for BR, but for base only. And, B and BR are subject to Address Generation Interlock (AGI) delay caused when the base (or index) is loaded soon before the branch is executed. J is never subject to AGI.

--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
310-338-0400 x318
[email protected]
http://www.phoenixsoftware.com/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to