This is the mail archive of the binutils@sourceware.org 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: PR20989, sparc GOT sequence optimization


On Mon, Jan 02, 2017 at 09:53:44AM +0100, Jose E. Marchesi wrote:
>     +/* Return whether H is local and its ADDRESS is within 4G of
>     +   _GLOBAL_OFFSET_TABLE_ and thus the offset may be calculated by a
>     +   sethi, xor sequence.  */
> 
> Generally speaking the address must be within {+-}2G of
> _GLOBAL_OFFSET_TABLE_, i.e. there can be negative offsets.

I allowed +/-4G, and believe that is the range of sethi, xor.

	sethi	%hi(-1), %l7      # 0x0000 0000 ffff fc00
	xor	%l7, -0x400, %l6  # 0xffff ffff 0000 0000

	xor	%l7, 0x3ff, %l5   # 0x0000 0000 ffff ffff

-- 
Alan Modra
Australia Development Lab, IBM


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