This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: MIPS patch to avoid lazy binding in la macros
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: binutils at sources dot redhat dot com, echristo at redhat dot com
- Date: Tue, 25 Feb 2003 13:40:13 +0100 (MET)
- Subject: Re: MIPS patch to avoid lazy binding in la macros
- Organization: Technical University of Gdansk
On 24 Feb 2003, Richard Sandiford wrote:
> So I agree. Let's drop the patch for 2.14. Maybe we can revisit
> it after 2.14 branches. Or maybe we should leave things as-is.
I think we should drop it at one point. It exists there, because there
were no alternatives when it was written..
> > There is a point, not necessarily for o32 only: how do you express
> > something like this (using the notation I used previosly):
> >
> > la $25,%call(foo)
> > jal %got(bar)
> >
> > to get CALL relocations for foo and GOT ones for bar as appropriate for
> > the selected ABI and GOT model? OK, a minor one, though -- they may be
> > named say %call_r and %got_r and the NewABI (inconsistent -- who the hell
> > does invent that stuff?) conventions be left as is.
>
> This would be more for assembler programmers, right?
Mainly, although if someone wanted to maintain old gcc, he could use
them as well.
> GCC really ought to split the la and jal macros up into individual
> instructions (rewrite branch does this). But I can see that
> hand-written code might want to use things like 'la ..%call()'
> as well, to cater for both the small-GOT and big-GOT casees.
Not only that. For an assembly language programmer it lets gas emit
better code, e.g. accounting for different ranges of offsets. Using
machine instructions only you lose that ability unless you want to
fragment code into lots of #if chunks.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro at ds2 dot pg dot gda dot pl, PGP key available +