relax jalr $t9 [R_MIPS_JALR symbol] to bal symbol

Alexandre Oliva aoliva@redhat.com
Tue Mar 25 23:35:00 GMT 2003


On Mar 25, 2003, Ralf Baechle <ralf@linux-mips.org> wrote:

> I can't imagine implementations are intelligent enough to detect
> this special case in their branch prediction so branches may
> occasionally be misspredicted.

I'd think they should.  Gee, it's a special register, after all!
Anyway, we could the `likely' version of this instruction, if we find
that the next instruction is a nop.  Heck we could even try to copy
the instruction from the branch target and branch to the next
instruction instead, as long as it's not a branch itself.  It's just a
matter of programming :-)

> So I'd say go for the bal thing.

Yeah, one step at a time.  I just need approval from the MIPS
maintainer now.  Hmm...  I *think* Eric had pre-approved this.  Eric,
can you confirm?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer



More information about the Binutils mailing list