2 ({ unsigned long __offset; \
4 "0:\t.long " #x "@ntpoff\n" \
6 : "=a" (__offset) : : "cc" ); \
7 (int *) (__builtin_thread_pointer() + __offset); })
11 ({ unsigned long __offset, __got; \
13 "0:\t.long _GLOBAL_OFFSET_TABLE_-0b\n\t" \
14 ".long " #x "@gotntpoff\n" \
15 "1:\tl %1,0(%0)\n\t" \
16 "la %1,0(%1,%0)\n\t" \
18 "l %0,0(%0,%1):tls_load:" #x "\n" \
19 : "=&a" (__offset), "=&a" (__got) : : "cc" ); \
20 (int *) (__builtin_thread_pointer() + __offset); })
23 ({ unsigned long __offset; \
25 "0:\t.long " #x "@indntpoff\n" \
26 "1:\t l %0,0(%0)\n\t" \
27 "l %0,0(%0):tls_load:" #x \
28 : "=&a" (__offset) : : "cc" ); \
29 (int *) (__builtin_thread_pointer() + __offset); })
34 ({ unsigned long __offset, __save12; \
36 "0:\t.long _GLOBAL_OFFSET_TABLE_-0b\n\t" \
37 ".long __tls_get_offset@plt-0b\n\t" \
38 ".long " #x "@tlsldm\n\t" \
39 ".long " #x "@dtpoff\n" \
40 "1:\tlr %1,%%r12\n\t" \
42 "la %%r12,0(%%r12,%0)\n\t" \
45 "bas %%r14,0(%%r1,%0):tls_ldcall:" #x "\n\t" \
49 : "=&a" (__offset), "=&a" (__save12) \
50 : : "cc", "0", "1", "2", "3", "4", "5" ); \
51 (int *) (__builtin_thread_pointer() + __offset); })
54 ({ unsigned long __offset; \
56 "0:\t.long _GLOBAL_OFFSET_TABLE_\n\t" \
57 ".long __tls_get_offset@plt\n\t" \
58 ".long " #x "@tlsldm\n\t" \
59 ".long " #x "@dtpoff\n" \
60 "1:\tl %%r12,0(%0)\n\t" \
63 "bas %%r14,0(%%r1):tls_ldcall:" #x "\n\t" \
66 : "=&a" (__offset) : : "cc", "0", "1", "2", "3", "4", "5", "12" ); \
67 (int *) (__builtin_thread_pointer() + __offset); })
72 ({ unsigned long __offset, __save12; \
74 "0:\t.long _GLOBAL_OFFSET_TABLE_-0b\n\t" \
75 ".long __tls_get_offset@plt-0b\n\t" \
76 ".long " #x "@tlsgd\n" \
77 "1:\tlr %1,%%r12\n\t" \
79 "la %%r12,0(%%r12,%0)\n\t" \
82 "bas %%r14,0(%%r1,%0):tls_gdcall:" #x "\n\t" \
85 : "=&a" (__offset), "=&a" (__save12) \
86 : : "cc", "0", "1", "2", "3", "4", "5" ); \
87 (int *) (__builtin_thread_pointer() + __offset); })
90 ({ unsigned long __offset; \
92 "0:\t.long _GLOBAL_OFFSET_TABLE_\n\t" \
93 ".long __tls_get_offset@plt\n\t" \
94 ".long " #x "@tlsgd\n" \
95 "1:\tl %%r12,0(%0)\n\t" \
98 "bas %%r14,0(%%r1):tls_gdcall:" #x "\n\t" \
100 : "=&a" (__offset) : : "cc", "0", "1", "2", "3", "4", "5", "12" ); \
101 (int *) (__builtin_thread_pointer() + __offset); })