This is the mail archive of the 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 to improve MIPS %hi/%lo matching

Richard Sandiford wrote:
> 	* 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.


> !       /* 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? :-)


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