This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: 2.10.91: A problem with R_MIPS_CALL relocations within gas
- To: macro at ds2 dot pg dot gda dot pl
- Subject: Re: 2.10.91: A problem with R_MIPS_CALL relocations within gas
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 17 Nov 2000 09:16:52 -0800
- CC: binutils at sourceware dot cygnus dot com, ralf at uni-koblenz dot de, ulfc at engr dot sgi dot com
- References: <Pine.GSO.3.96.1001117154750.28481B-100000@delta.ds2.pg.gda.pl>
Date: Fri, 17 Nov 2000 18:11:21 +0100 (MET)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Gcc however prefers to
generate code like the following:
la $25,<symbol>
jalr $25
possibly because there are problems with other MIPS assemblers.
FYI, gcc does this to permit better instruction scheduling. Splitting
up the instructions permits, e.g., putting the la instruction in a
delay slot. Other MIPS toolchains do extensive instruction scheduling
in the assembler, but in the GNU toolchain gcc can do a better job of
that.
Your patch looks OK to me. The only thing I would change would be the
comments, to put ``if tempreg is PIC_CALL_REG'' before the new sample
code, as in ``or, if tempreg is PIC_CALL_REG,''.
Ian