1 /* Macros to support TLS testing in times of missing compiler support. */
3 #define COMMON_INT_DEF(x) \
4 asm (".tls_common " #x ",4,4")
6 /* XXX This definition will probably be machine specific, too. */
7 #define VAR_INT_DEF(x) \
8 asm (".section .tdata\n\t" \
14 /* XXX Each architecture must have its own asm for now. */
18 asm ("movl %%gs:0,%0\n\t" \
19 "subl $" #x "@tpoff,%0" \
27 "1:\tmovl (%%esp), %%ebx\n\t" \
30 "addl $_GLOBAL_OFFSET_TABLE_, %%ebx\n\t" \
31 "movl %%gs:0,%0\n\t" \
32 "subl " #x "@gottpoff(%%ebx),%0" \
33 : "=r" (__l), "=&b" (__b)); \
40 "1:\tmovl (%%esp), %%ebx\n\t" \
43 "addl $_GLOBAL_OFFSET_TABLE_, %%ebx\n\t" \
44 "leal " #x "@tlsldm(%%ebx),%%eax\n\t" \
45 "call ___tls_get_addr@plt\n\t" \
46 "leal " #x "@dtpoff(%%eax), %%eax" \
47 : "=a" (__l), "=&b" (__b)); \
54 "1:\tmovl (%%esp), %%ebx\n\t" \
57 "addl $_GLOBAL_OFFSET_TABLE_, %%ebx\n\t" \
58 "leal " #x "@tlsgd(%%ebx),%%eax\n\t" \
59 "call ___tls_get_addr@plt\n\t" \
61 : "=a" (__l), "=&b" (__b)); \
65 # error "No support for this architecture so far."