Currently, a "jcc" executes all the following instructions, even if the branch is unlikely to happen.
li64 1/5
li64 2/5
li64 3/5
li64 4/5
li64 5/5
mtctr
nop for the overflow 1/2
nop for the overflow 2/2
bcctr with conditions
In order to avoid loading adresses when it is unlikely to execute a branch, we may use the following:
bc with negated conditions to the end of this block (+36 bytes)
li64 1/5
li64 2/5
li64 3/5
li64 4/5
li64 5/5
mtctr
nop for the overflow 1/2
nop for the overflow 2/2
bctr unconditionally
this issue is based on the current "next". On toc-implementatio-data-block there is no li64, but "ld(lwz) rt, r2(offset)", i.e. we use toc, in spite of li64. Avoiding "loads" from memory are also good to improve performance.
Currently, a "jcc" executes all the following instructions, even if the branch is unlikely to happen.
In order to avoid loading adresses when it is unlikely to execute a branch, we may use the following: