This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PR20989, sparc GOT sequence optimization
- From: Alan Modra <amodra at gmail dot com>
- To: "Jose E. Marchesi" <jose dot marchesi at oracle dot com>
- Cc: binutils at sourceware dot org, Rainer Orth <ro at gcc dot gnu dot org>, "David S. Miller" <davem at davemloft dot net>
- Date: Mon, 2 Jan 2017 22:04:50 +1030
- Subject: Re: PR20989, sparc GOT sequence optimization
- Authentication-results: sourceware.org; auth=none
- References: <20161227030359.GE340@bubble.grove.modra.org> <878tqt3krr.fsf@oracle.com>
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