relax jalr $t9 [R_MIPS_JALR symbol] to bal symbol
Ralf Baechle
ralf@linux-mips.org
Tue Mar 25 21:39:00 GMT 2003
On Mon, Mar 24, 2003 at 07:56:22PM -0800, Richard Henderson wrote:
> Um, I dunno. I suspect that bal will never be slower than jal
> on any implementation; it's not impossible that the reverse is
> not true. Anyone know how this affects Real Life Implementations?
bal is actually bgezall $zero, dest that is a conditional branch with
a condition that is always true. I can't imagine implementations are
intelligent enough to detect this special case in their branch prediction
so branches may occasionally be misspredicted. Still better the jalr
instruction which occasionally may take the penalty for loading the
destination address from the GOT and fetching another cacheline from
memory. So I'd say go for the bal thing.
Ralf
More information about the Binutils
mailing list