This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Patch to improve MIPS %hi/%lo matching
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- To: binutils at sources dot redhat dot com
- Date: Sat, 3 Jul 2004 13:25:17 +0200
- Subject: Re: Patch to improve MIPS %hi/%lo matching
- References: <87y8m1bc20.fsf@redhat.com>
Richard Sandiford wrote:
[snip]
> * config/tc-mips.c (HAVE_IN_PLACE_ADDENDS): New macro.
> (reloc_needs_lo_p): Only return true if HAVE_IN_PLACE_ADDENDS.
> (mips_frob_file): Rework so that only a single pass through the
> relocs is needed. Allow %lo()s to have higher offsets than their
> corresponding %hi()s or %got()s.
>
> testsuite/
> * gas/mips/elf{,el}-rel.d: Adjust so that the earliest %hi() matches
> the earliest %lo().
> * gas/mips/elf-rel9.[sd]: Fix typo in %lo() expression.
> * gas/mips/elf-rel11.d: Don't expect the relocs to be reordered.
> * gas/mips/elf-rel20.[sd]: New test.
> * gas/mips/mips.exp: Run it.
Ok.
> ! /* If we found a match, remove the high-part relocation from its
> ! current position and insert it before the low-part relocation.
> ! Make the offsets match so that fixup_has_matching_lo_p()
> ! will return true.
> !
> ! We don't warn about unmatched high-part relocations since some
> ! versions of gcc have been known to emit dead "lui ...%hi(...)"
> ! instructions. */
Which versions of gcc exactly? Or is the "have been known" part
actually true? :-)
Thiemo