This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] MIPS gas problems with gcc's explicit relocs
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- To: binutils at sources dot redhat dot com
- Date: Thu, 3 Jun 2004 20:50:53 +0200
- Subject: Re: [patch] MIPS gas problems with gcc's explicit relocs
- References: <Pine.LNX.4.55.0405281900120.7804@jurand.ds.pg.gda.pl> <20040528212522.GU17309@rembrandt.csv.ica.uni-stuttgart.de> <Pine.LNX.4.55.0405282326460.4045@jurand.ds.pg.gda.pl> <20040528225807.GW17309@rembrandt.csv.ica.uni-stuttgart.de> <Pine.LNX.4.55.0405290103560.4531@jurand.ds.pg.gda.pl>
Maciej W. Rozycki wrote:
[snip]
> > > I like the current behavior of gcc for being optimal.
> >
> > Creating broken code can hardly be called optimal.
>
> Please justify. Note e.g. "dla $4,0x100($2)" is currently OK, but you
> consider "dla $4,%lo(foo)($2)" bad. Why?
We misunderstood each other. I think adding in some register value
to dla is a misfeature of gas (I've expained in more detail in another
mail just sent).
Adding some code to handle
(d)la <reg>, %reloc(<sym>)
isn't wrong, but probably a bit nonsensical, given that (d)la is supposed
to do the expansion required to handle %reloc itself (for %reloc in
%highest, %higher, %hi, %lo).
[snip]
> > This would be broken syntax.
> >
> > <op> <reg>,<addr>
> >
> > loads an absolute address in a register, while
>
> Nope, it loads the content pointed to by addr, of which the register part
> happens to be $zero.
No, it doesn't dereference.
Thiemo