1 /* Macros to support TLS testing in times of missing compiler support. */
3 extern void *__tls_get_addr (void *);
6 ({ register void *__gp asm ("$29"); void *__result; \
7 asm ("lda %0, " #x "($gp) !tlsgd" : "=r" (__result) : "r"(__gp)); \
8 __tls_get_addr (__result); })
11 ({ register void *__gp asm ("$29"); void *__result; \
12 asm ("lda %0, " #x "($gp) !tlsldm" : "=r" (__result) : "r"(__gp)); \
13 __result = __tls_get_addr (__result); \
14 asm ("lda %0, " #x "(%0) !dtprel" : "+r" (__result)); \
18 ({ register void *__gp asm ("$29"); long ofs; \
19 asm ("ldq %0, " #x "($gp) !gottprel" : "=r"(ofs) : "r"(__gp)); \
20 __builtin_thread_pointer () + ofs; })
23 ({ void *__result = __builtin_thread_pointer (); \
24 asm ("lda %0, " #x "(%0) !tprel" : "+r" (__result)); \