alpha: Fix tls-macros.h

Reported to the gcc bugzilla, there was a missing dependency on $gp
that let the compiler generated $gp reload be scheduled across the
macros here.

(cherry picked from commit 4ab6acaebd)
This commit is contained in:
Richard Henderson 2014-01-24 09:07:04 -08:00 committed by Mike Frysinger
parent f09e8aec0c
commit 787172fdbb

View File

@ -2,21 +2,21 @@
extern void *__tls_get_addr (void *);
# define TLS_GD(x) \
({ void *__result; \
asm ("lda %0, " #x "($gp) !tlsgd" : "=r" (__result)); \
# define TLS_GD(x) \
({ register void *__gp asm ("$29"); void *__result; \
asm ("lda %0, " #x "($gp) !tlsgd" : "=r" (__result) : "r"(__gp)); \
__tls_get_addr (__result); })
# define TLS_LD(x) \
({ void *__result; \
asm ("lda %0, " #x "($gp) !tlsldm" : "=r" (__result)); \
__result = __tls_get_addr (__result); \
asm ("lda %0, " #x "(%0) !dtprel" : "+r" (__result)); \
# define TLS_LD(x) \
({ register void *__gp asm ("$29"); void *__result; \
asm ("lda %0, " #x "($gp) !tlsldm" : "=r" (__result) : "r"(__gp)); \
__result = __tls_get_addr (__result); \
asm ("lda %0, " #x "(%0) !dtprel" : "+r" (__result)); \
__result; })
# define TLS_IE(x) \
({ long ofs; \
asm ("ldq %0, " #x "($gp) !gottprel" : "=r"(ofs)); \
# define TLS_IE(x) \
({ register void *__gp asm ("$29"); long ofs; \
asm ("ldq %0, " #x "($gp) !gottprel" : "=r"(ofs) : "r"(__gp)); \
__builtin_thread_pointer () + ofs; })
# define TLS_LE(x) \