mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-15 04:20:28 +08:00
68b7efaadb
Also fixed the following whitespace nits to satisfy the push: sysdeps/alpha/alphaev6/memset.S:142: space before tab in indent. sysdeps/alpha/configure:1: new blank line at EOF. sysdeps/alpha/fpu/e_sqrt.c:126: space before tab in indent. sysdeps/alpha/preconfigure:1: new blank line at EOF. sysdeps/unix/sysv/linux/alpha/syscalls.list:1: new blank line at EOF.
26 lines
949 B
C
26 lines
949 B
C
/* Macros to support TLS testing in times of missing compiler support. */
|
|
|
|
extern void *__tls_get_addr (void *);
|
|
|
|
# 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) \
|
|
({ 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) \
|
|
({ 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) \
|
|
({ void *__result = __builtin_thread_pointer (); \
|
|
asm ("lda %0, " #x "(%0) !tprel" : "+r" (__result)); \
|
|
__result; })
|