tls-macros.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* Macros to support TLS testing in times of missing compiler support. */
  2. #define COMMON_INT_DEF(x) \
  3. __asm__ (".tls_common " #x ",4,4")
  4. /* XXX Until we get compiler support we don't need declarations. */
  5. #define COMMON_INT_DECL(x)
  6. /* XXX This definition will probably be machine specific, too. */
  7. #define VAR_INT_DEF(x) \
  8. __asm__ (".section .tdata\n\t" \
  9. ".globl " #x "\n" \
  10. ".balign 4\n" \
  11. #x ":\t.long 0\n\t" \
  12. ".size " #x ",4\n\t" \
  13. ".previous")
  14. /* XXX Until we get compiler support we don't need declarations. */
  15. #define VAR_INT_DECL(x)
  16. #ifdef __alpha__
  17. #include <tls-macros-alpha.h>
  18. #endif
  19. #ifdef __arc__
  20. #include <tls-macros-arc.h>
  21. #endif
  22. #ifdef __arm__
  23. #ifdef __thumb__
  24. #include <tls-macros-thumb.h>
  25. #else
  26. #include <tls-macros-arm.h>
  27. #endif
  28. #endif
  29. #ifdef __i386__
  30. #include <tls-macros-i386.h>
  31. #endif
  32. #ifdef __ia64__
  33. #include <tls-macros-ia64.h>
  34. #endif
  35. #ifdef __metag__
  36. #include <tls-macros-metag.h>
  37. #endif
  38. #ifdef __mips__
  39. #include <tls-macros-mips.h>
  40. #endif
  41. #ifdef __powerpc__
  42. #include <tls-macros-powerpc.h>
  43. #endif
  44. #ifdef __sh__
  45. #include <tls-macros-sh.h>
  46. #endif
  47. #ifdef __sparc__
  48. #include <tls-macros-sparc.h>
  49. #endif
  50. #ifdef __x86_64__
  51. #include <tls-macros-x86_64.h>
  52. #endif
  53. #ifdef __xtensa__
  54. #include <tls-macros-xtensa.h>
  55. #endif
  56. #if !defined TLS_LE || !defined TLS_IE \
  57. || !defined TLS_LD || !defined TLS_GD
  58. # error "No support for this architecture so far."
  59. #endif