diff options
author | Richard Henderson <rth@twiddle.net> | 2014-01-24 09:07:04 -0800 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2014-01-24 09:07:04 -0800 |
commit | 4ab6acaebd0047dc37c6493946484be9f1b4920b (patch) | |
tree | 1ec789f38b37b1226e56b8500286065b5f88d00e /ports/sysdeps | |
parent | 47590bce28616abbcee93457da91d65a7a07589b (diff) | |
download | glibc-4ab6acaebd0047dc37c6493946484be9f1b4920b.zip glibc-4ab6acaebd0047dc37c6493946484be9f1b4920b.tar.gz glibc-4ab6acaebd0047dc37c6493946484be9f1b4920b.tar.bz2 |
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.
Diffstat (limited to 'ports/sysdeps')
-rw-r--r-- | ports/sysdeps/alpha/tls-macros.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ports/sysdeps/alpha/tls-macros.h b/ports/sysdeps/alpha/tls-macros.h index 0385d93..00489c2 100644 --- a/ports/sysdeps/alpha/tls-macros.h +++ b/ports/sysdeps/alpha/tls-macros.h @@ -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) \ |