[PATCH] S/390: Fix two issues with the IFUNC optimized mem* routines

Richard Henderson rth@twiddle.net
Thu Aug 30 16:33:00 GMT 2012


On 08/30/2012 08:13 AM, Andreas Krebbel wrote:
>> There's no reason to *ever* drop a hidden function pointer
>> into the constant pool, since LARL is always available.
> 
> The problem was that I unfortunately missed to mark the references
> hidden in a way visible to GCC :(

Ah, well, that'll do it every time.  ;-)

All that said, it's probably reasonable have the linker transform

	lg   r1,x@got(b2)
or
	lgrl r1,x@got
into
	larl r1,x

when it finds that X has appropriate alignment and has been made
hidden via linker maps or other mechanisms not visible to the compiler.

The use of lgrl would be an enhancement to gcc for use on z10+ to
completely eliminate the got register.  Freeing up another register
definitely seems like a useful optimization.


r~



More information about the Libc-alpha mailing list