This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ARM THUMB: fundamental bug in handling of far jumps?
On Wed, Jan 30, 2002 at 11:30:51AM +0000, Richard Earnshaw wrote:
> The static prediction rules are trivial:
>
> - unconditional branches are predicted taken, as are unconditional
> calls to subroutines
> - conditional calls to subroutines are predicted not-taken
> - conditional branches are predicted taken if they are backwards and
> not taken if they are forwards.
[...]
> So it would make sense if GCC's block re-ordering code could be made to
> take rules such as these into account.
Generally it does, since these are approximately the same rules
that other target's static predictors use. And the rules used
to initialize the state of a dynamic predictor given a branch
tag cache miss.
r~