This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] MIPS gas problems with gcc's explicit relocs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]