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: Fix synthesized doubleword transfers (ping)


"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


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