Move some fenv.h override macros to generic math_private.h.
[glibc.git] / sysdeps / alpha / tls-macros.h
blob00489c289fa9ca1e23b882f1ea3855e397422d3f
1 /* Macros to support TLS testing in times of missing compiler support. */
3 extern void *__tls_get_addr (void *);
5 # define TLS_GD(x) \
6 ({ register void *__gp asm ("$29"); void *__result; \
7 asm ("lda %0, " #x "($gp) !tlsgd" : "=r" (__result) : "r"(__gp)); \
8 __tls_get_addr (__result); })
10 # define TLS_LD(x) \
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)); \
15 __result; })
17 # define TLS_IE(x) \
18 ({ register void *__gp asm ("$29"); long ofs; \
19 asm ("ldq %0, " #x "($gp) !gottprel" : "=r"(ofs) : "r"(__gp)); \
20 __builtin_thread_pointer () + ofs; })
22 # define TLS_LE(x) \
23 ({ void *__result = __builtin_thread_pointer (); \
24 asm ("lda %0, " #x "(%0) !tprel" : "+r" (__result)); \
25 __result; })