| lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /* Macros to support TLS testing in times of missing compiler support.  */ | 
|  | 2 |  | 
|  | 3 | #define COMMON_INT_DEF(x) \ | 
|  | 4 | asm (".tls_common " #x ",4,4") | 
|  | 5 | /* XXX Until we get compiler support we don't need declarations.  */ | 
|  | 6 | #define COMMON_INT_DECL(x) | 
|  | 7 |  | 
|  | 8 | /* XXX This definition will probably be machine specific, too.  */ | 
|  | 9 | #define VAR_INT_DEF(x) \ | 
|  | 10 | asm (".section .tdata\n\t"						      \ | 
|  | 11 | ".globl " #x "\n"						      \ | 
|  | 12 | ".balign 4\n"							      \ | 
|  | 13 | #x ":\t.long 0\n\t"						      \ | 
|  | 14 | ".size " #x ",4\n\t"						      \ | 
|  | 15 | ".previous") | 
|  | 16 | /* XXX Until we get compiler support we don't need declarations.  */ | 
|  | 17 | #define VAR_INT_DECL(x) | 
|  | 18 |  | 
|  | 19 | #include_next <tls-macros.h> | 
|  | 20 |  | 
|  | 21 | /* XXX Each architecture must have its own asm for now.  */ | 
|  | 22 | #if !defined TLS_LE || !defined TLS_IE \ | 
|  | 23 | || !defined TLS_LD || !defined TLS_GD | 
|  | 24 | # error "No support for this architecture so far." | 
|  | 25 | #endif |