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: Fri, 28 May 2004 23:25:22 +0200
- Subject: Re: [patch] MIPS gas problems with gcc's explicit relocs
- References: <Pine.LNX.4.55.0405281900120.7804@jurand.ds.pg.gda.pl>
Maciej W. Rozycki wrote:
[snip]
> asm("dla\t%0,%1" : "=r" (result) : "m" (foo));
[snip]
> lui $2,%highest(foo)
> daddiu $2,$2,%higher(foo)
> dsll $2,$2,16
> daddiu $2,$2,%hi(foo)
> dsll $2,$2,16
> #APP
> dla $2,%lo(foo)($2)
> #NO_APP
IMHO this is broken in the compiler. It should either only provide the
sympol for %1, or handle the dla expansion correctly, preferably with
better optimization for superscalar processors (that is, a
lui - lui - daddiu - daddiu - dsll32 - daddu sequence).
Thiemo