This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] MIPS: Fix synthesized doubleword transfers (ping)
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: "Maciej W. Rozycki" <macro at linux-mips dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 24 Feb 2005 21:05:18 +0000
- Subject: Re: [patch] MIPS: Fix synthesized doubleword transfers (ping)
- References: <Pine.LNX.4.61L.0502242001360.23589@blysk.ds.pg.gda.pl>
"Maciej W. Rozycki" <macro@linux-mips.org> writes:
> * config/tc-mips.c (macro): Avoid a reloc overflow for word
> memory transfers in expansions of the "li.d", "l.d", "s.d", "ld"
> and "sd" macros.
Don't these instructions require doubleword-aligned addresses?
If so, I don't see the problem. The relocs for "sym+offset"
should always be sorted as:
HI16 sym (in-place addend of %hi(offset))
LO16 sym (in-place addend of %lo(offset))
LO16 sym (in-place addend of %lo(offset+4))
and the linker will do the right thing.
I suppose bad things could happen if you composed an aligned
address from an unaligned symbol and an unaligned offset,
but is that allowed?
Richard