PR20989, sparc GOT sequence optimization
Jose E. Marchesi
jose.marchesi@oracle.com
Mon Jan 2 12:38:00 GMT 2017
> +/* 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
I stand corrected. In 64-bits the range is indeed a signed 33-bit
constant.
More information about the Binutils
mailing list