relax jalr $t9 [R_MIPS_JALR symbol] to bal symbol

Alexandre Oliva aoliva@redhat.com
Mon Mar 24 10:43:00 GMT 2003


The idea of the optimization is to take advantage of the R_MIPS_JALR
relocations emitted by the n32 and n64 assemblers to avoid pipeline
stalls due to dependencies between the instruction that loads the
symbol address into $t9 and the jalr instruction, that, because of the
way GCC generates code, will generally be adjacent.  If symbol is
reachable with a branch, and it's not overridable, we replace the jump
with a branch.  The transformation is only enabled when the --relax
flag is passed to the linker.  Tested on mips64-linux-gnu.  Ok to
install?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-relax-jalr.patch
Type: text/x-patch
Size: 13334 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030324/1e2fd584/attachment.bin>
-------------- next part --------------

-- 
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