Re: [PATCH 02/10] addr32: Output REX prefix for UNSPEC_GOTNTPOFF

2012-03-05 Thread Uros Bizjak
On Mon, Mar 5, 2012 at 6:03 PM, H.J. Lu wrote: >>> X86-64 linker optimizes TLS_MODEL_INITIAL_EXEC to TLS_MODEL_LOCAL_EXEC >>> by checking >>> >>>        movq foo@gottpoff(%rip), %reg >>> >>> and >>> >>>        addq foo@gottpoff(%rip), %reg >>> >>> It uses the REX prefix to avoid the last byte of

Re: [PATCH 02/10] addr32: Output REX prefix for UNSPEC_GOTNTPOFF

2012-03-05 Thread H.J. Lu
On Mon, Mar 5, 2012 at 7:31 AM, Uros Bizjak wrote: > On Fri, Mar 2, 2012 at 9:36 PM, H.J. Lu wrote: > >> X86-64 linker optimizes TLS_MODEL_INITIAL_EXEC to TLS_MODEL_LOCAL_EXEC >> by checking >> >>        movq foo@gottpoff(%rip), %reg >> >> and >> >>        addq foo@gottpoff(%rip), %reg >> >> It u

Re: [PATCH 02/10] addr32: Output REX prefix for UNSPEC_GOTNTPOFF

2012-03-05 Thread Uros Bizjak
On Fri, Mar 2, 2012 at 9:36 PM, H.J. Lu wrote: > X86-64 linker optimizes TLS_MODEL_INITIAL_EXEC to TLS_MODEL_LOCAL_EXEC > by checking > >        movq foo@gottpoff(%rip), %reg > > and > >        addq foo@gottpoff(%rip), %reg > > It uses the REX prefix to avoid the last byte of the previous > instr

Re: [PATCH 02/10] addr32: Output REX prefix for UNSPEC_GOTNTPOFF

2012-03-04 Thread H.J. Lu
On Sun, Mar 4, 2012 at 2:52 PM, Uros Bizjak wrote: > On Sun, Mar 4, 2012 at 11:38 PM, H.J. Lu wrote: >> On Sun, Mar 4, 2012 at 2:12 PM, Uros Bizjak wrote: >>> On Fri, Mar 2, 2012 at 9:36 PM, H.J. Lu wrote: >>> X86-64 linker optimizes TLS_MODEL_INITIAL_EXEC to TLS_MODEL_LOCAL_EXEC by c

Re: [PATCH 02/10] addr32: Output REX prefix for UNSPEC_GOTNTPOFF

2012-03-04 Thread Uros Bizjak
On Sun, Mar 4, 2012 at 11:38 PM, H.J. Lu wrote: > On Sun, Mar 4, 2012 at 2:12 PM, Uros Bizjak wrote: >> On Fri, Mar 2, 2012 at 9:36 PM, H.J. Lu wrote: >> >>> X86-64 linker optimizes TLS_MODEL_INITIAL_EXEC to TLS_MODEL_LOCAL_EXEC >>> by checking >>> >>>        movq foo@gottpoff(%rip), %reg >>> >>

Re: [PATCH 02/10] addr32: Output REX prefix for UNSPEC_GOTNTPOFF

2012-03-04 Thread H.J. Lu
On Sun, Mar 4, 2012 at 2:12 PM, Uros Bizjak wrote: > On Fri, Mar 2, 2012 at 9:36 PM, H.J. Lu wrote: > >> X86-64 linker optimizes TLS_MODEL_INITIAL_EXEC to TLS_MODEL_LOCAL_EXEC >> by checking >> >>        movq foo@gottpoff(%rip), %reg >> >> and >> >>        addq foo@gottpoff(%rip), %reg >> >> It u

Re: [PATCH 02/10] addr32: Output REX prefix for UNSPEC_GOTNTPOFF

2012-03-04 Thread Uros Bizjak
On Fri, Mar 2, 2012 at 9:36 PM, H.J. Lu wrote: > X86-64 linker optimizes TLS_MODEL_INITIAL_EXEC to TLS_MODEL_LOCAL_EXEC > by checking > >        movq foo@gottpoff(%rip), %reg > > and > >        addq foo@gottpoff(%rip), %reg > > It uses the REX prefix to avoid the last byte of the previous > instr

[PATCH 02/10] addr32: Output REX prefix for UNSPEC_GOTNTPOFF

2012-03-02 Thread H.J. Lu
X86-64 linker optimizes TLS_MODEL_INITIAL_EXEC to TLS_MODEL_LOCAL_EXEC by checking movq foo@gottpoff(%rip), %reg and addq foo@gottpoff(%rip), %reg It uses the REX prefix to avoid the last byte of the previous instruction. With 32bit Pmode, we may not have the REX prefix and the